<html>
<head><meta charset="utf-8"><title>Place 2.0 · t-compiler/wg-mir-opt · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/index.html">t-compiler/wg-mir-opt</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html">Place 2.0</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="161174999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/161174999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#161174999">(Mar 19 2019 at 17:59)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> you around?</p>



<a name="161175083"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/161175083" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#161175083">(Mar 19 2019 at 18:00)</a>:</h4>
<p>btw <a href="#narrow/stream/131828-t-compiler/topic/place.202.2E0" title="#narrow/stream/131828-t-compiler/topic/place.202.2E0">link to previous discussion</a></p>



<a name="161175130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/161175130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#161175130">(Mar 19 2019 at 18:01)</a>:</h4>
<p>saw this <a href="https://github.com/rust-lang/rust/pull/59232" target="_blank" title="https://github.com/rust-lang/rust/pull/59232">https://github.com/rust-lang/rust/pull/59232</a> and I guess we are going to have a lot of conflicts between this one and the Place struct thing</p>



<a name="161175138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/161175138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#161175138">(Mar 19 2019 at 18:01)</a>:</h4>
<p>wondering what should we do exactly?</p>



<a name="161175239"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/161175239" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#161175239">(Mar 19 2019 at 18:02)</a>:</h4>
<p>i'll be here in 30 mins</p>



<a name="161175299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/161175299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#161175299">(Mar 19 2019 at 18:03)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="161177126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/161177126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#161177126">(Mar 19 2019 at 18:25)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> I think the conflicts are going to be benign, but yes, they are definitely going to happen</p>



<a name="161177579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/161177579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#161177579">(Mar 19 2019 at 18:30)</a>:</h4>
<p>ok</p>



<a name="162559246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162559246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162559246">(Apr 04 2019 at 19:21)</a>:</h4>
<p>hi <span class="user-mention" data-user-id="124288">@oli</span> back to OSS life :)</p>



<a name="162559264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162559264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162559264">(Apr 04 2019 at 19:22)</a>:</h4>
<p>my idea is to do the struct change now</p>



<a name="162559315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162559315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162559315">(Apr 04 2019 at 19:22)</a>:</h4>
<p>and then do the iterator thing, which I opened a WIP some time ago</p>



<a name="162559320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162559320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162559320">(Apr 04 2019 at 19:22)</a>:</h4>
<p>does that sound correct?</p>



<a name="162559329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162559329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162559329">(Apr 04 2019 at 19:22)</a>:</h4>
<p>I need to start remembering what I was doing :P</p>



<a name="162564316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162564316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162564316">(Apr 04 2019 at 20:18)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <span class="user-mention" data-user-id="119009">@eddyb</span> for the sake of understanding a bit why is this question there <a href="https://github.com/rust-lang/rust/pull/59232/files#r269485022" target="_blank" title="https://github.com/rust-lang/rust/pull/59232/files#r269485022">https://github.com/rust-lang/rust/pull/59232/files#r269485022</a> ?</p>



<a name="162564514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162564514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162564514">(Apr 04 2019 at 20:21)</a>:</h4>
<p>oh hey I was gonna ask you what the status of this refactor is, but I couldn't find you on here because Zulip makes people use their full names (which is IMO silly for a chat platform like this but nevermind)</p>



<a name="162564524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162564524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162564524">(Apr 04 2019 at 20:21)</a>:</h4>
<p>that question is regarding the <code>ty</code> field</p>



<a name="162564560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162564560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162564560">(Apr 04 2019 at 20:21)</a>:</h4>
<p>those <code>Ty</code>s (there's another one on field projections) are there for performance reasons, as I understand it</p>



<a name="162564570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162564570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162564570">(Apr 04 2019 at 20:21)</a>:</h4>
<p>since you can always get the type if you have a <code>TyCtxt</code></p>



<a name="162564718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162564718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162564718">(Apr 04 2019 at 20:23)</a>:</h4>
<p>NLL uses them to store a version with all of the lifetimes replaced with inference variables. I'm not sure how necessary this is.</p>



<a name="162564799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162564799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162564799">(Apr 04 2019 at 20:24)</a>:</h4>
<p>you never need that</p>



<a name="162564815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162564815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162564815">(Apr 04 2019 at 20:24)</a>:</h4>
<p><code>static</code> can't be parameterized</p>



<a name="162564830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162564830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162564830">(Apr 04 2019 at 20:24)</a>:</h4>
<p>and for fields, the type is the one you get by substituting the definition type with the substitiions of the ADT</p>



<a name="162564847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162564847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162564847">(Apr 04 2019 at 20:24)</a>:</h4>
<p>NLL replaces the lifetimes in those substitutions, so they would naturally propagate to the field type</p>



<a name="162564878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162564878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162564878">(Apr 04 2019 at 20:25)</a>:</h4>
<p>like, if you think about it, lifetimes have to come from somewhere, those <code>Ty</code>s are just caches</p>



<a name="162565214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162565214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162565214">(Apr 04 2019 at 20:29)</a>:</h4>
<blockquote>
<p>oh hey I was gonna ask you what the status of this refactor is, but I couldn't find you on here because Zulip makes people use their full names (which is IMO silly for a chat platform like this but nevermind)</p>
</blockquote>
<p>I was not working on this thing because I was running Rust Latam</p>



<a name="162565218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162565218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162565218">(Apr 04 2019 at 20:29)</a>:</h4>
<p>back to this :)</p>



<a name="162565237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162565237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162565237">(Apr 04 2019 at 20:30)</a>:</h4>
<p>tomorrow I'm going to start spending more time on time and the first couple of changes should be fairly easy to do I think</p>



<a name="162631488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162631488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162631488">(Apr 05 2019 at 15:08)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> you around?</p>



<a name="162631517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162631517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162631517">(Apr 05 2019 at 15:09)</a>:</h4>
<p>I was wondering in this code ...</p>



<a name="162631527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162631527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162631527">(Apr 05 2019 at 15:09)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">struct</span> <span class="nc">Place</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">base</span>: <span class="nc">PlaceBase</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">projection</span>: <span class="nc">PlaceProjection</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">enum</span> <span class="nc">PlaceProjection</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">Base</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">Projection</span><span class="p">(</span><span class="nb">Box</span><span class="o">&lt;</span><span class="n">PlaceProjection</span><span class="o">&gt;</span><span class="p">),</span><span class="w"></span>
<span class="w">    </span><span class="n">Deref</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">Index</span><span class="p">(..),</span><span class="w"></span>
<span class="w">    </span><span class="p">...</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="162631566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162631566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162631566">(Apr 05 2019 at 15:09)</a>:</h4>
<p>what do we want to do with the generic definition we previously had of the <code>Projection</code></p>



<a name="162631595"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162631595" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162631595">(Apr 05 2019 at 15:09)</a>:</h4>
<p>I guess if we want <code>PlaceProjection</code> that's not generic anymore</p>



<a name="162631683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162631683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162631683">(Apr 05 2019 at 15:10)</a>:</h4>
<p>but I guess we want to have some generic definition?</p>



<a name="162631689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162631689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162631689">(Apr 05 2019 at 15:10)</a>:</h4>
<p>maybe something like ...</p>



<a name="162631951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162631951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162631951">(Apr 05 2019 at 15:12)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">struct</span> <span class="nc">Place</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">base</span>: <span class="nc">PlaceBase</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">projection</span>: <span class="nc">PlaceProjection</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">type</span> <span class="nc">PlaceProjection</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GenericProjection</span><span class="o">&lt;</span><span class="n">Place</span><span class="p">,</span><span class="w"> </span><span class="n">Ty</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="k">enum</span> <span class="nc">GenericProjection</span><span class="o">&lt;</span><span class="n">V</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">Base</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">Projection</span><span class="p">(</span><span class="nb">Box</span><span class="o">&lt;</span><span class="n">GenericProjection</span><span class="o">&lt;</span><span class="n">V</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;&gt;</span><span class="p">),</span><span class="w"></span>
<span class="w">    </span><span class="n">Deref</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">Index</span><span class="p">(..),</span><span class="w"></span>
<span class="w">    </span><span class="p">...</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="162631987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162631987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162631987">(Apr 05 2019 at 15:12)</a>:</h4>
<p>I guess we want something like that?</p>



<a name="162636714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162636714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162636714">(Apr 05 2019 at 16:12)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> thoughts? ^^^</p>



<a name="162636764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162636764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162636764">(Apr 05 2019 at 16:13)</a>:</h4>
<p>anyway, I'm working on it regardless, asking just in case you want to do something different than I'm doing :)</p>



<a name="162697317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162697317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162697317">(Apr 06 2019 at 11:14)</a>:</h4>
<p>you should  keep it as generic as possible, I think</p>



<a name="162697322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162697322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162697322">(Apr 06 2019 at 11:14)</a>:</h4>
<p>and as aliased as today</p>



<a name="162857778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162857778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162857778">(Apr 08 2019 at 21:42)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> <span class="user-mention" data-user-id="124288">@oli</span> to start with before diving into zillions of changes</p>



<a name="162857807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162857807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162857807">(Apr 08 2019 at 21:42)</a>:</h4>
<p>do we want <a href="https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9" target="_blank" title="https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9">this changes in the structures</a>?</p>



<a name="162857817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162857817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162857817">(Apr 08 2019 at 21:42)</a>:</h4>
<p>check out a couple of FIXME that are there</p>



<a name="162857865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162857865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162857865">(Apr 08 2019 at 21:43)</a>:</h4>
<p>I think we don't want <code>ProjectionElem</code> and neither <code>PlaceElem</code> given that with the new structures there's no separate concept of an projection elem</p>



<a name="162857941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162857941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162857941">(Apr 08 2019 at 21:44)</a>:</h4>
<p>there's base and elem altogether</p>



<a name="162858148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162858148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162858148">(Apr 08 2019 at 21:47)</a>:</h4>
<p>I left them still, maybe is worth to make that change compile and then removing those structs and adapt them to use, instead of the <code>ProjectionElem</code> that has the FIXME we want to adapt the code and use the new <code>Projection</code> both are generic and instead of the <code>PlaceElem</code> that has the FIXME we want to adapt the code and use the new <code>PlaceProjection</code> both are concrete</p>



<a name="162858209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162858209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162858209">(Apr 08 2019 at 21:48)</a>:</h4>
<p>tomorrow I will probably be able to finish this part, your pointers would be nice so I don't dive into a nightmare of changes that go in the wrong direction :)</p>



<a name="162883842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162883842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162883842">(Apr 09 2019 at 06:05)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> that change doesn't work until we actually get rid of the recursion</p>



<a name="162883907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162883907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162883907">(Apr 09 2019 at 06:06)</a>:</h4>
<p>you'll need to keep <code>Projection</code> and <code>ProjectionElem</code> around. Your new <code>Projection</code> variant is just direct recursion without any metadata.</p>



<a name="162884017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162884017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162884017">(Apr 09 2019 at 06:09)</a>:</h4>
<p>The <code>base</code> field could just be <code>Option&lt;Box&lt;Projection&lt;B, V, T&gt;&gt;</code> and <code>None</code> for the leaf-situation</p>



<a name="162884023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162884023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162884023">(Apr 09 2019 at 06:09)</a>:</h4>
<p>then the <code>ProjectionElem</code> enum doesn't need any changes</p>



<a name="162884030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162884030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162884030">(Apr 09 2019 at 06:09)</a>:</h4>
<p>Sorry about misleading you there, I didn't think that through</p>



<a name="162884104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162884104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162884104">(Apr 09 2019 at 06:10)</a>:</h4>
<p>You're right, once we move to slices, the <code>Projection</code> type can be removed and we'll just have <code>ProjectionElem</code>, which can then be renamed to <code>Projection</code></p>



<a name="162918778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162918778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162918778">(Apr 09 2019 at 15:01)</a>:</h4>
<p>so ... I'm now trying to understand exactly what this step is about</p>



<a name="162918860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162918860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162918860">(Apr 09 2019 at 15:02)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> so you meant to leave <code>Projection</code> and <code>ProjectionElem</code> as they are currently in the code?</p>



<a name="162918877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162918877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162918877">(Apr 09 2019 at 15:02)</a>:</h4>
<p>and just change <code>Place</code> from enum to struct?</p>



<a name="162918887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162918887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162918887">(Apr 09 2019 at 15:02)</a>:</h4>
<p>/cc <span class="user-mention" data-user-id="119009">@eddyb</span></p>



<a name="162918919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162918919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162918919">(Apr 09 2019 at 15:03)</a>:</h4>
<p>trying to understand the step from the doc that says ...</p>



<a name="162918952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162918952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162918952">(Apr 09 2019 at 15:03)</a>:</h4>
<blockquote>
<ul>
<li>Change Place to</li>
</ul>
</blockquote>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">struct</span> <span class="nc">Place</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">base</span>: <span class="nc">PlaceBase</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">projection</span>: <span class="nc">PlaceProjection</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="k">enum</span> <span class="nc">PlaceProjection</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">Base</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">Projection</span><span class="p">(</span><span class="nb">Box</span><span class="o">&lt;</span><span class="n">PlaceProjection</span><span class="o">&gt;</span><span class="p">),</span><span class="w"></span>
<span class="w">        </span><span class="n">Deref</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">Index</span><span class="p">(..),</span><span class="w"></span>
<span class="w">        </span><span class="p">...</span><span class="w"></span>
</pre></div>


<p>..</p>



<a name="162918956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162918956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162918956">(Apr 09 2019 at 15:03)</a>:</h4>
<p>I'm lacking a lot of context, sorry</p>



<a name="162918996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162918996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162918996">(Apr 09 2019 at 15:03)</a>:</h4>
<p>the <code>Projection</code> variant there is obviously wrong</p>



<a name="162919009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919009">(Apr 09 2019 at 15:03)</a>:</h4>
<p>it's just an unary encoding</p>



<a name="162919073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919073">(Apr 09 2019 at 15:04)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> I'm just talking about <a href="https://paper.dropbox.com/doc/Place-2.0-current-PR-status--Aa4SgFPQ34YAIfVjdc_oBL7DAg-vmbnFv8VkCEuL57QfWWMH" target="_blank" title="https://paper.dropbox.com/doc/Place-2.0-current-PR-status--Aa4SgFPQ34YAIfVjdc_oBL7DAg-vmbnFv8VkCEuL57QfWWMH">https://paper.dropbox.com/doc/Place-2.0-current-PR-status--Aa4SgFPQ34YAIfVjdc_oBL7DAg-vmbnFv8VkCEuL57QfWWMH</a> that step that says <code>change Place to</code></p>



<a name="162919077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919077">(Apr 09 2019 at 15:04)</a>:</h4>
<p><code>Projection(Projection(Projection(Base)))</code> is the number 3 with no other information :P</p>



<a name="162919090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919090">(Apr 09 2019 at 15:04)</a>:</h4>
<p>yes</p>



<a name="162919091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919091">(Apr 09 2019 at 15:04)</a>:</h4>
<p>that's wrong</p>



<a name="162919109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919109">(Apr 09 2019 at 15:04)</a>:</h4>
<p>it should be a list</p>



<a name="162919129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919129">(Apr 09 2019 at 15:04)</a>:</h4>
<p>I'm more trying to understand what you wanted to do with the code more than what I'd do :)</p>



<a name="162919133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919133">(Apr 09 2019 at 15:04)</a>:</h4>
<p>which means you just want a linked list an enum that's very much like today for the actual elem</p>



<a name="162919148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919148">(Apr 09 2019 at 15:05)</a>:</h4>
<p>I mean, you know way more than me about the compiler so my ideas may miss a lot of things</p>



<a name="162919150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919150">(Apr 09 2019 at 15:05)</a>:</h4>
<p>me? I don't know, I didn't come up with this linked list form</p>



<a name="162919212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919212">(Apr 09 2019 at 15:05)</a>:</h4>
<p>when I've said you I was referring to the compiler team members that come with this idea</p>



<a name="162919217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919217">(Apr 09 2019 at 15:05)</a>:</h4>
<p>I thought those were you and <span class="user-mention" data-user-id="124288">@oli</span> :)</p>



<a name="162919220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919220">(Apr 09 2019 at 15:05)</a>:</h4>
<p>but whatever</p>



<a name="162919228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919228">(Apr 09 2019 at 15:05)</a>:</h4>
<p>I wasn't involved, sorry :(</p>



<a name="162919280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919280">(Apr 09 2019 at 15:06)</a>:</h4>
<p>no worries</p>



<a name="162919314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919314">(Apr 09 2019 at 15:06)</a>:</h4>
<p>/cc <span class="user-mention" data-user-id="124288">@oli</span></p>



<a name="162919727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919727">(Apr 09 2019 at 15:11)</a>:</h4>
<p>I guess this <a href="https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9" target="_blank" title="https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9">https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9</a> is what you're talking about</p>



<a name="162919837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919837">(Apr 09 2019 at 15:12)</a>:</h4>
<p>mmmmaybe?</p>



<a name="162919856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919856">(Apr 09 2019 at 15:12)</a>:</h4>
<p>hehe, yes</p>



<a name="162919867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919867">(Apr 09 2019 at 15:12)</a>:</h4>
<p><code>projection: Option&lt;Box&lt;PlaceProjection&lt;'tcx&gt;&gt;&gt;,</code></p>



<a name="162919886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919886">(Apr 09 2019 at 15:12)</a>:</h4>
<p>I think this would make it equivalent</p>



<a name="162919934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162919934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162919934">(Apr 09 2019 at 15:13)</a>:</h4>
<p>to get rid of base in projection?</p>



<a name="162920026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162920026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162920026">(Apr 09 2019 at 15:14)</a>:</h4>
<p>no</p>



<a name="162920038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162920038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162920038">(Apr 09 2019 at 15:14)</a>:</h4>
<p>to allow no projections, like <code>Place::Base</code> today</p>



<a name="162921028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162921028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162921028">(Apr 09 2019 at 15:25)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> yeah, true added that but you still need the option in base</p>



<a name="162921127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162921127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162921127">(Apr 09 2019 at 15:26)</a>:</h4>
<p>yeah you need both</p>



<a name="162969044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162969044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162969044">(Apr 10 2019 at 02:46)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> please when you are around confirm what do we want to do exactly :)</p>



<a name="162969045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162969045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162969045">(Apr 10 2019 at 02:46)</a>:</h4>
<p>I'm a bit confused</p>



<a name="162969049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162969049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162969049">(Apr 10 2019 at 02:46)</a>:</h4>
<p>my guess is that we want something like ...</p>



<a name="162969050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162969050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162969050">(Apr 10 2019 at 02:46)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="n">diff</span><span class="w"> </span><span class="o">--</span><span class="n">git</span><span class="w"> </span><span class="n">a</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">librustc</span><span class="o">/</span><span class="n">mir</span><span class="o">/</span><span class="k">mod</span><span class="p">.</span><span class="n">rs</span><span class="w"> </span><span class="n">b</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">librustc</span><span class="o">/</span><span class="n">mir</span><span class="o">/</span><span class="k">mod</span><span class="p">.</span><span class="n">rs</span><span class="w"></span>
<span class="n">index</span><span class="w"> </span><span class="mi">8424</span><span class="n">c096e88</span><span class="p">..</span><span class="mf">2120e741452</span><span class="w"> </span><span class="mi">100644</span><span class="w"></span>
<span class="o">---</span><span class="w"> </span><span class="n">a</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">librustc</span><span class="o">/</span><span class="n">mir</span><span class="o">/</span><span class="k">mod</span><span class="p">.</span><span class="n">rs</span><span class="w"></span>
<span class="o">+++</span><span class="w"> </span><span class="n">b</span><span class="o">/</span><span class="n">src</span><span class="o">/</span><span class="n">librustc</span><span class="o">/</span><span class="n">mir</span><span class="o">/</span><span class="k">mod</span><span class="p">.</span><span class="n">rs</span><span class="w"></span>
<span class="o">@@</span><span class="w"> </span><span class="o">-</span><span class="mi">1900</span><span class="p">,</span><span class="mi">11</span><span class="w"> </span><span class="o">+</span><span class="mi">1900</span><span class="p">,</span><span class="mi">11</span><span class="w"> </span><span class="o">@@</span><span class="w"> </span><span class="k">impl</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Debug</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">Statement</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="sd">/// A path to a value; something that can be evaluated without</span>
<span class="w"> </span><span class="sd">/// changing or disturbing program state.</span>
<span class="w"> </span><span class="cp">#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable, HashStable)]</span><span class="w"></span>
<span class="o">-</span><span class="k">pub</span><span class="w"> </span><span class="k">enum</span> <span class="nc">Place</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="o">-</span><span class="w">    </span><span class="n">Base</span><span class="p">(</span><span class="n">PlaceBase</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">),</span><span class="w"></span>
<span class="o">+</span><span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">Place</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="o">+</span><span class="w">    </span><span class="n">base</span>: <span class="nc">PlaceBase</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>

<span class="w">     </span><span class="sd">/// projection out of a place (access a field, deref a pointer, etc)</span>
<span class="o">-</span><span class="w">    </span><span class="n">Projection</span><span class="p">(</span><span class="nb">Box</span><span class="o">&lt;</span><span class="n">PlaceProjection</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;&gt;</span><span class="p">),</span><span class="w"></span>
<span class="o">+</span><span class="w">    </span><span class="n">projection</span>: <span class="nb">Option</span><span class="o">&lt;</span><span class="nb">Box</span><span class="o">&lt;</span><span class="n">PlaceProjection</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;&gt;&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>

<span class="w"> </span><span class="cp">#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable, HashStable)]</span><span class="w"></span>
<span class="o">@@</span><span class="w"> </span><span class="o">-</span><span class="mi">1941</span><span class="p">,</span><span class="mi">7</span><span class="w"> </span><span class="o">+</span><span class="mi">1941</span><span class="p">,</span><span class="mi">7</span><span class="w"> </span><span class="o">@@</span><span class="w"> </span><span class="n">impl_stable_hash_for</span><span class="o">!</span><span class="p">(</span><span class="k">struct</span> <span class="nc">Static</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="cp">#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord,</span>
<span class="cp">          Hash, RustcEncodable, RustcDecodable, HashStable)]</span><span class="w"></span>
<span class="w"> </span><span class="k">pub</span><span class="w"> </span><span class="k">struct</span> <span class="nc">Projection</span><span class="o">&lt;</span><span class="n">B</span><span class="p">,</span><span class="w"> </span><span class="n">V</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="o">-</span><span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="n">base</span>: <span class="nc">B</span><span class="p">,</span><span class="w"></span>
<span class="o">+</span><span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="n">next</span>: <span class="nb">Option</span><span class="o">&lt;</span><span class="n">B</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">     </span><span class="k">pub</span><span class="w"> </span><span class="n">elem</span>: <span class="nc">ProjectionElem</span><span class="o">&lt;</span><span class="n">V</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="162969064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162969064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162969064">(Apr 10 2019 at 02:47)</a>:</h4>
<p>the current <code>Place</code> is a thing that goes backwards</p>



<a name="162969077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162969077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162969077">(Apr 10 2019 at 02:47)</a>:</h4>
<p><code>a.b.c</code> is represented as <code>.c -&gt; .b -&gt; .a</code></p>



<a name="162969086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162969086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162969086">(Apr 10 2019 at 02:47)</a>:</h4>
<p>if we now have a base and projection at the same time I guess we have</p>



<a name="162969088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162969088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162969088">(Apr 10 2019 at 02:48)</a>:</h4>
<p><code>a</code> as the base</p>



<a name="162969140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162969140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162969140">(Apr 10 2019 at 02:48)</a>:</h4>
<p>and in the projection we want <code>.b</code> to be the elem and the next to be the <code>.c</code> part, is that right?</p>



<a name="162969243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162969243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162969243">(Apr 10 2019 at 02:50)</a>:</h4>
<p>if we want the new thing in this particular step to be backwards I don't know what represents to have first both base and projection, projection would be <code>.c</code> and base <code>a</code>? what would be that useful for?</p>



<a name="162969260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162969260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162969260">(Apr 10 2019 at 02:51)</a>:</h4>
<p>what needs to be done is easy but I'm kind of stucked trying to understand what do we want to accomplish :/</p>



<a name="162971563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162971563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162971563">(Apr 10 2019 at 03:48)</a>:</h4>
<p>btw, this is what I meant <a href="https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9" target="_blank" title="https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9">https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9</a> with the from left to right idea</p>



<a name="162971668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162971668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162971668">(Apr 10 2019 at 03:51)</a>:</h4>
<p>or it could even be a list of projections and stop that silly recursion</p>



<a name="162971717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162971717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162971717">(Apr 10 2019 at 03:52)</a>:</h4>
<p>but I guess <span class="user-mention" data-user-id="124288">@oli</span> had reasons to make a step that somehow resembles the current code</p>



<a name="162986899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162986899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162986899">(Apr 10 2019 at 09:06)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> I was thinking that we'd end up with <code>(a, .c -&gt; .b)</code> as a first step</p>



<a name="162986946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162986946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162986946">(Apr 10 2019 at 09:07)</a>:</h4>
<p>having an intermediate step where the order is <code>(a, .b -&gt; .c)</code> is unnecessary I think, at that point we can go to the slice directly</p>



<a name="162986956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162986956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162986956">(Apr 10 2019 at 09:07)</a>:</h4>
<p>so essentially what you had in <a href="https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9" target="_blank" title="https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9">https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9</a></p>



<a name="162994348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162994348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162994348">(Apr 10 2019 at 11:11)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> I guess you meant this <a href="https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9/ce2b1c8d7017d49938921d5ea2dcccac899c7fe7" target="_blank" title="https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9/ce2b1c8d7017d49938921d5ea2dcccac899c7fe7">https://gist.github.com/spastorino/f5b88513e866cf7e0acf23cef8e507c9/ce2b1c8d7017d49938921d5ea2dcccac899c7fe7</a> specific revision</p>



<a name="162994364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162994364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162994364">(Apr 10 2019 at 11:11)</a>:</h4>
<p>yes</p>



<a name="162994371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162994371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162994371">(Apr 10 2019 at 11:11)</a>:</h4>
<p>the weird thing there is the option in <code>base</code>'s <code>Projection</code> field</p>



<a name="162994417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162994417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162994417">(Apr 10 2019 at 11:12)</a>:</h4>
<p>so ... that's None in the <code>.b</code> case?</p>



<a name="162994623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162994623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162994623">(Apr 10 2019 at 11:15)</a>:</h4>
<p>I meant, if we want this <code>(a, .c -&gt; .b)</code>, <code>.c</code> base would be <code>.b</code> and <code>.b</code> base would be <code>None</code></p>



<a name="162994640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162994640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162994640">(Apr 10 2019 at 11:15)</a>:</h4>
<p>which is a bit weird</p>



<a name="162994714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162994714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162994714">(Apr 10 2019 at 11:16)</a>:</h4>
<p>that in the case <code>base</code> is a <code>Projection</code></p>



<a name="162994941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162994941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162994941">(Apr 10 2019 at 11:19)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> but you yeah, you could handle that considering that when the <code>base</code> of a <code>Projection</code> is <code>None</code> you just go to the original <code>Place</code>, <code>a</code> in this case</p>



<a name="162994956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162994956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162994956">(Apr 10 2019 at 11:19)</a>:</h4>
<p>yea, it's weird because we need two <code>Option</code>s</p>



<a name="162994959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162994959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162994959">(Apr 10 2019 at 11:19)</a>:</h4>
<p>ok</p>



<a name="162995017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995017">(Apr 10 2019 at 11:20)</a>:</h4>
<p>my main question now is ... what are you foreseen exactly by using this structured in this way?</p>



<a name="162995020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995020">(Apr 10 2019 at 11:20)</a>:</h4>
<p>I honestly did not see this when I was thinking about this transformation originally</p>



<a name="162995024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995024">(Apr 10 2019 at 11:20)</a>:</h4>
<p>instead of going just straight to use a <code>Vec</code></p>



<a name="162995032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995032">(Apr 10 2019 at 11:20)</a>:</h4>
<p>the important part of this transformation is the <code>base</code> field on <code>Place</code></p>



<a name="162995037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995037">(Apr 10 2019 at 11:21)</a>:</h4>
<p>ok</p>



<a name="162995046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995046">(Apr 10 2019 at 11:21)</a>:</h4>
<p>many algorithms just want that and don't care about the projections</p>



<a name="162995051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995051">(Apr 10 2019 at 11:21)</a>:</h4>
<p>you just want to transform to use a base and don't care about the rest</p>



<a name="162995057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995057">(Apr 10 2019 at 11:21)</a>:</h4>
<p>that's more or less the idea</p>



<a name="162995062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995062">(Apr 10 2019 at 11:21)</a>:</h4>
<p>If we do the <code>base</code> field change and the <code>slice</code> change in two PRs, then we have fewer places to modify at once</p>



<a name="162995063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995063">(Apr 10 2019 at 11:21)</a>:</h4>
<p>yes, exactly</p>



<a name="162995065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995065">(Apr 10 2019 at 11:21)</a>:</h4>
<p>perfect</p>



<a name="162995088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995088">(Apr 10 2019 at 11:22)</a>:</h4>
<blockquote>
<p>I honestly did not see this when I was thinking about this transformation originally</p>
</blockquote>
<p>you did not see what? sorry</p>



<a name="162995120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995120">(Apr 10 2019 at 11:22)</a>:</h4>
<p>that you'd end up needing options and whatnot</p>



<a name="162995124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995124">(Apr 10 2019 at 11:22)</a>:</h4>
<p>the fact that we needed <code>Option</code> in ... :)</p>



<a name="162995133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995133">(Apr 10 2019 at 11:22)</a>:</h4>
<p>ok, thanks for the info</p>



<a name="162995143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995143">(Apr 10 2019 at 11:22)</a>:</h4>
<p>need to leave for a bit and a bit later going to do this</p>



<a name="162995158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995158">(Apr 10 2019 at 11:23)</a>:</h4>
<p>but may be back and start to read your proposal to see what's coming next and may ask questions</p>



<a name="162995168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/162995168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#162995168">(Apr 10 2019 at 11:23)</a>:</h4>
<p>so I have a better picture of the rest of the work</p>



<a name="163009315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009315">(Apr 10 2019 at 14:28)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> the structure we come up with is wrong :)</p>



<a name="163009326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009326">(Apr 10 2019 at 14:29)</a>:</h4>
<p>at least I think it is</p>



<a name="163009330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009330">(Apr 10 2019 at 14:29)</a>:</h4>
<p>for instance</p>



<a name="163009693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009693">(Apr 10 2019 at 14:32)</a>:</h4>
<p>sorry got distracted</p>



<a name="163009695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009695">(Apr 10 2019 at 14:32)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="sd">/// Finds the innermost `Local` from this `Place`, *if* it is either a local itself or</span>
<span class="w">    </span><span class="sd">/// a single deref of a local.</span>
<span class="w">    </span><span class="c1">//</span>
<span class="w">    </span><span class="c1">// FIXME: can we safely swap the semantics of `fn base_local` below in here instead?</span>
<span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">local</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Option</span><span class="o">&lt;</span><span class="n">Local</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="k">match</span><span class="w"> </span><span class="bp">self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">Place</span>::<span class="n">Base</span><span class="p">(</span><span class="n">PlaceBase</span>::<span class="n">Local</span><span class="p">(</span><span class="n">local</span><span class="p">))</span><span class="w"> </span><span class="o">|</span><span class="w"></span>
<span class="w">            </span><span class="n">Place</span>::<span class="n">Projection</span><span class="p">(</span><span class="k">box</span><span class="w"> </span><span class="n">Projection</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="n">base</span>: <span class="nc">Place</span>::<span class="n">Base</span><span class="p">(</span><span class="n">PlaceBase</span>::<span class="n">Local</span><span class="p">(</span><span class="n">local</span><span class="p">)),</span><span class="w"></span>
<span class="w">                </span><span class="n">elem</span>: <span class="nc">ProjectionElem</span>::<span class="n">Deref</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="p">})</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="o">*</span><span class="n">local</span><span class="p">),</span><span class="w"></span>
<span class="w">            </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="163009726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009726">(Apr 10 2019 at 14:32)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> in order to implement this exactly what do you do?</p>



<a name="163009785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009785">(Apr 10 2019 at 14:33)</a>:</h4>
<p>you match on <code>self.base</code> I presume (<code>Self</code> is <code>Place</code>, right?)</p>



<a name="163009791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009791">(Apr 10 2019 at 14:33)</a>:</h4>
<p>yes</p>



<a name="163009794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009794">(Apr 10 2019 at 14:33)</a>:</h4>
<p>irgnore all projections</p>



<a name="163009796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009796">(Apr 10 2019 at 14:33)</a>:</h4>
<p>oh</p>



<a name="163009798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009798">(Apr 10 2019 at 14:33)</a>:</h4>
<p>I misread</p>



<a name="163009802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009802">(Apr 10 2019 at 14:33)</a>:</h4>
<p>but well, the code is saying ... :)</p>



<a name="163009807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009807">(Apr 10 2019 at 14:33)</a>:</h4>
<p>yes</p>



<a name="163009863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009863">(Apr 10 2019 at 14:34)</a>:</h4>
<p>I meant, we need a way in projections a way to go to the base place as a <code>PlaceBase</code></p>



<a name="163009868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009868">(Apr 10 2019 at 14:34)</a>:</h4>
<p>so, checking for a local is the first step, and then check that the projections are either empty, or contain just a deref projection</p>



<a name="163009890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009890">(Apr 10 2019 at 14:34)</a>:</h4>
<p>the projections don't need to know about the base</p>



<a name="163009938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009938">(Apr 10 2019 at 14:35)</a>:</h4>
<p>hmmm in the way I was reading the idea was ...</p>



<a name="163009952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163009952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163009952">(Apr 10 2019 at 14:35)</a>:</h4>
<p>if you want you can also do <code>match (self.base, self.projection)</code> to get back almost the same code that shows up here, now</p>



<a name="163010068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010068">(Apr 10 2019 at 14:36)</a>:</h4>
<p>but according to what I've said earlier (in case I was right) <code>self.base</code> is not really the base of the <code>self.projection</code> element</p>



<a name="163010072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010072">(Apr 10 2019 at 14:36)</a>:</h4>
<p>is the top base</p>



<a name="163010075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010075">(Apr 10 2019 at 14:36)</a>:</h4>
<p>so</p>



<a name="163010079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010079">(Apr 10 2019 at 14:36)</a>:</h4>
<p><code>a.b.c</code></p>



<a name="163010104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010104">(Apr 10 2019 at 14:36)</a>:</h4>
<p>the first arm would be <code>(PlaceBase::Local(local), None) | (PlaceBase::Local(local), Some(box Projection { base: None, elem: ProjectionElem::Deref }))</code></p>



<a name="163010113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010113">(Apr 10 2019 at 14:36)</a>:</h4>
<p>I have <code>c</code> in the projection and <code>a</code> in base</p>



<a name="163010136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010136">(Apr 10 2019 at 14:37)</a>:</h4>
<p>the old code was <code>c</code> in the projection and <code>b</code> in base</p>



<a name="163010152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010152">(Apr 10 2019 at 14:37)</a>:</h4>
<p>so it was checking that <code>c</code> was a <code>Deref</code> and <code>b</code> was a <code>Local</code></p>



<a name="163010161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010161">(Apr 10 2019 at 14:37)</a>:</h4>
<p>I don't have any way to do that now</p>



<a name="163010211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010211">(Apr 10 2019 at 14:37)</a>:</h4>
<p>right, but all this function cares about is having either a local or a deref projeciton on a local</p>



<a name="163010307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010307">(Apr 10 2019 at 14:38)</a>:</h4>
<p>right <code>a.b.c</code> is not a <code>Deref</code></p>



<a name="163010322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010322">(Apr 10 2019 at 14:38)</a>:</h4>
<p>you're right</p>



<a name="163010325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010325">(Apr 10 2019 at 14:38)</a>:</h4>
<p>thanks</p>



<a name="163010329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010329">(Apr 10 2019 at 14:39)</a>:</h4>
<p>we either have <code>local</code> or <code>local.deref</code></p>



<a name="163010354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010354">(Apr 10 2019 at 14:39)</a>:</h4>
<p>all other cases are irrelevant for this function</p>



<a name="163010382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010382">(Apr 10 2019 at 14:39)</a>:</h4>
<p>yes yes</p>



<a name="163010390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010390">(Apr 10 2019 at 14:39)</a>:</h4>
<p>I was more thinking about fields</p>



<a name="163010400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010400">(Apr 10 2019 at 14:39)</a>:</h4>
<p>I still have some notes from the all hands that we'll want to nuke <code>Deref</code> at some point anyway. Your changes will make that so much easier!</p>



<a name="163010413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010413">(Apr 10 2019 at 14:39)</a>:</h4>
<p>then this function becomes nonexistant</p>



<a name="163010469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010469">(Apr 10 2019 at 14:40)</a>:</h4>
<p>:)</p>



<a name="163010479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010479">(Apr 10 2019 at 14:40)</a>:</h4>
<p>ok ok, gonna keep this going</p>



<a name="163010532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010532">(Apr 10 2019 at 14:40)</a>:</h4>
<p>after a couple of changes I may push something for you to check just in case everything feels in the right direction</p>



<a name="163010563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010563">(Apr 10 2019 at 14:40)</a>:</h4>
<p>I can have a look immediately if you want</p>



<a name="163010599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010599">(Apr 10 2019 at 14:41)</a>:</h4>
<p>there are so many changes to do that I don't want to end with 2.000 lines changes but have done the wrong thing :')</p>



<a name="163010611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010611">(Apr 10 2019 at 14:41)</a>:</h4>
<blockquote>
<p>I can have a look immediately if you want</p>
</blockquote>
<p>cool, gonna try to push something in a couple of minutes</p>



<a name="163010638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163010638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163010638">(Apr 10 2019 at 14:41)</a>:</h4>
<p>is going to lack a lot of things but at least fix this file and see if everything looks more or less ok</p>



<a name="163015403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163015403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163015403">(Apr 10 2019 at 15:31)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> I've figured that you probably want to check this <a href="https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45" target="_blank" title="https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45">https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45</a></p>



<a name="163015958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163015958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163015958">(Apr 10 2019 at 15:36)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> mostly some nits on the pattern matches which can be simpler now</p>



<a name="163015991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163015991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163015991">(Apr 10 2019 at 15:37)</a>:</h4>
<p>the changes in the datastructure lgtm</p>



<a name="163017793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163017793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163017793">(Apr 10 2019 at 15:57)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> your comments are right</p>



<a name="163017862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163017862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163017862">(Apr 10 2019 at 15:58)</a>:</h4>
<p>(deleted)</p>



<a name="163056212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163056212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163056212">(Apr 10 2019 at 23:36)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> ...</p>



<a name="163056230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163056230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163056230">(Apr 10 2019 at 23:37)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">is_upvar_field_projection</span><span class="o">&lt;</span><span class="na">&#39;cx</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;gcx</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">mir</span>: <span class="kp">&amp;</span><span class="na">&#39;cx</span><span class="w"> </span><span class="n">Mir</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">                                                </span><span class="n">tcx</span>: <span class="kp">&amp;</span><span class="nc">TyCtxt</span><span class="o">&lt;</span><span class="na">&#39;cx</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;gcx</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Option</span><span class="o">&lt;</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="p">(</span><span class="n">place</span><span class="p">,</span><span class="w"> </span><span class="n">by_ref</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">Place</span>::<span class="n">Projection</span><span class="p">(</span><span class="k">ref</span><span class="w"> </span><span class="n">proj</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">ProjectionElem</span>::<span class="n">Deref</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">proj</span><span class="p">.</span><span class="n">elem</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="p">(</span><span class="o">&amp;</span><span class="n">proj</span><span class="p">.</span><span class="n">base</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="kc">false</span><span class="p">)</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="kc">false</span><span class="p">)</span><span class="w"></span>
<span class="w">        </span><span class="p">};</span><span class="w"></span>

<span class="w">        </span><span class="k">match</span><span class="w"> </span><span class="n">place</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">Place</span>::<span class="n">Projection</span><span class="p">(</span><span class="k">ref</span><span class="w"> </span><span class="n">proj</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="k">match</span><span class="w"> </span><span class="n">proj</span><span class="p">.</span><span class="n">elem</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="n">ProjectionElem</span>::<span class="n">Field</span><span class="p">(</span><span class="n">field</span><span class="p">,</span><span class="w"> </span><span class="n">_ty</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="kd">let</span><span class="w"> </span><span class="n">base_ty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">proj</span><span class="p">.</span><span class="n">base</span><span class="p">.</span><span class="n">ty</span><span class="p">(</span><span class="n">mir</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">tcx</span><span class="p">).</span><span class="n">ty</span><span class="p">;</span><span class="w"></span>

<span class="w">                    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">base_ty</span><span class="p">.</span><span class="n">is_closure</span><span class="p">()</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">base_ty</span><span class="p">.</span><span class="n">is_generator</span><span class="p">())</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"></span>
<span class="w">                        </span><span class="p">(</span><span class="o">!</span><span class="n">by_ref</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">mir</span><span class="p">.</span><span class="n">upvar_decls</span><span class="p">[</span><span class="n">field</span><span class="p">.</span><span class="n">index</span><span class="p">()].</span><span class="n">by_ref</span><span class="p">)</span><span class="w"></span>
<span class="w">                    </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="nb">Some</span><span class="p">(</span><span class="n">field</span><span class="p">)</span><span class="w"></span>
<span class="w">                    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="nb">None</span><span class="w"></span>
<span class="w">                    </span><span class="p">}</span><span class="w"></span>
<span class="w">                </span><span class="p">},</span><span class="w"></span>
<span class="w">                </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">            </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="163056236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163056236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163056236">(Apr 10 2019 at 23:37)</a>:</h4>
<p>this suggests that what we talked earlier is not ok?</p>



<a name="163056242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163056242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163056242">(Apr 10 2019 at 23:37)</a>:</h4>
<p>I mean, there place can be ... first a Deref and then a Field</p>



<a name="163056248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163056248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163056248">(Apr 10 2019 at 23:37)</a>:</h4>
<p>otherwise the code doesn't make a lot of sense</p>



<a name="163056297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163056297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163056297">(Apr 10 2019 at 23:38)</a>:</h4>
<p>wonder a couple of things</p>



<a name="163056299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163056299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163056299">(Apr 10 2019 at 23:38)</a>:</h4>
<p>first what to do there</p>



<a name="163056315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163056315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163056315">(Apr 10 2019 at 23:39)</a>:</h4>
<p>and second what are the possible combination of <code>Place</code>s, unsure if I'm properly understanding all the mixtures that can happen</p>



<a name="163056477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163056477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163056477">(Apr 10 2019 at 23:42)</a>:</h4>
<p>my guess is that what we talked earlier is fine but unsure how this code is possible</p>



<a name="163056500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163056500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163056500">(Apr 10 2019 at 23:43)</a>:</h4>
<p>I mean, how you can have a <code>Place</code> that is a projection deref, and it's base is a <code>Field</code></p>



<a name="163056512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163056512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163056512">(Apr 10 2019 at 23:44)</a>:</h4>
<p><code>a.b</code> and <code>b</code> being <code>Box</code>?</p>



<a name="163075741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163075741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163075741">(Apr 11 2019 at 07:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> basically any code that matched on <code>place</code> before, should now match on <code>place.projection</code></p>



<a name="163075788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163075788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163075788">(Apr 11 2019 at 07:08)</a>:</h4>
<p>you should not need to change anything structurally</p>



<a name="163075811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163075811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163075811">(Apr 11 2019 at 07:08)</a>:</h4>
<p>where you used to match on <code>place</code> and checked for a <code>Place::Base</code> variant, you don't need to match but can access <code>place.base</code></p>



<a name="163090035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090035">(Apr 11 2019 at 11:07)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> I'm a bit confused</p>



<a name="163090039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090039">(Apr 11 2019 at 11:08)</a>:</h4>
<p><a href="https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdL2043" target="_blank" title="https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdL2043">https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdL2043</a></p>



<a name="163090092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090092">(Apr 11 2019 at 11:08)</a>:</h4>
<p>maybe asking a more general question than the code there</p>



<a name="163090108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090108">(Apr 11 2019 at 11:09)</a>:</h4>
<p>I'm not sure about all the possibilities you can have on all place</p>



<a name="163090136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090136">(Apr 11 2019 at 11:09)</a>:</h4>
<p>for instance, is possible to have something like <code>a -&gt; b -&gt; c</code> and c being a projection which is a Deref and b being a Field?</p>



<a name="163090137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090137">(Apr 11 2019 at 11:09)</a>:</h4>
<p>or something like that</p>



<a name="163090138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090138">(Apr 11 2019 at 11:09)</a>:</h4>
<p>yes</p>



<a name="163090161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090161">(Apr 11 2019 at 11:10)</a>:</h4>
<p>what code produces that?</p>



<a name="163090192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090192">(Apr 11 2019 at 11:10)</a>:</h4>
<p>if c is box?</p>



<a name="163090213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090213">(Apr 11 2019 at 11:11)</a>:</h4>
<p>I'm asking this because from yesterday I thought you were saying that that's not possible</p>



<a name="163090221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090221">(Apr 11 2019 at 11:11)</a>:</h4>
<p>in particular <a href="https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdL2043" target="_blank" title="https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdL2043">https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdL2043</a> this code is not equivalent</p>



<a name="163090252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090252">(Apr 11 2019 at 11:12)</a>:</h4>
<p>that would be <code>Place { base: a, projection: Some(Box::new(PlaceProjection { projection ProjectionKind::Deref, base: Some(Box::new(PlaceProjection { base: None, Projection: ProjectionKind::Field }</code> (plus some closing brackets</p>



<a name="163090279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090279">(Apr 11 2019 at 11:12)</a>:</h4>
<p>yes, but I meant, what user code produces that structure?</p>



<a name="163090285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090285">(Apr 11 2019 at 11:13)</a>:</h4>
<p><code>*a.b</code> I think</p>



<a name="163090296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090296">(Apr 11 2019 at 11:13)</a>:</h4>
<p>so the AST is <code>Deref(Field(a))</code></p>



<a name="163090297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090297">(Apr 11 2019 at 11:13)</a>:</h4>
<p>ok</p>



<a name="163090299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090299">(Apr 11 2019 at 11:13)</a>:</h4>
<p>so as I was saying ...</p>



<a name="163090302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090302">(Apr 11 2019 at 11:13)</a>:</h4>
<blockquote>
<p>in particular <a href="https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdL2043" target="_blank" title="https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdL2043">https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdL2043</a> this code is not equivalent</p>
</blockquote>
<p>this ^^^ seems wrong</p>



<a name="163090353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090353">(Apr 11 2019 at 11:14)</a>:</h4>
<p>what part about it? It looks like the correct transformation from master to your datastructures</p>



<a name="163090381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090381">(Apr 11 2019 at 11:15)</a>:</h4>
<p>so if you have something like a -&gt; b -&gt; c</p>



<a name="163090386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090386">(Apr 11 2019 at 11:15)</a>:</h4>
<p>c is the projection which is a Field</p>



<a name="163090387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090387">(Apr 11 2019 at 11:15)</a>:</h4>
<p>b is a Deref</p>



<a name="163090405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090405">(Apr 11 2019 at 11:16)</a>:</h4>
<p>and a is something else</p>



<a name="163090439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090439">(Apr 11 2019 at 11:16)</a>:</h4>
<p>in the old code c is the deref and it's base is b</p>



<a name="163090443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090443">(Apr 11 2019 at 11:16)</a>:</h4>
<p>now when I use base I'm going straight to the top</p>



<a name="163090446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090446">(Apr 11 2019 at 11:16)</a>:</h4>
<p>which is a</p>



<a name="163090449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090449">(Apr 11 2019 at 11:16)</a>:</h4>
<p>so I'm skipping b entirely</p>



<a name="163090530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090530">(Apr 11 2019 at 11:18)</a>:</h4>
<p>sorry my example is bad</p>



<a name="163090536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090536">(Apr 11 2019 at 11:18)</a>:</h4>
<p>let me fix that</p>



<a name="163090537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090537">(Apr 11 2019 at 11:18)</a>:</h4>
<p>but you ensured there's no <code>b</code> via the <code>None</code></p>



<a name="163090543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090543">(Apr 11 2019 at 11:18)</a>:</h4>
<p><a href="https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdR2057" target="_blank" title="https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdR2057">https://github.com/spastorino/rust/commit/e8b4b773e421b8c1feb01c59817a2962f5ab3d45#diff-f0577ac900ffbd36d3bb3421a928cbbdR2057</a></p>



<a name="163090556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090556">(Apr 11 2019 at 11:19)</a>:</h4>
<p>yes, the code seems correct</p>



<a name="163090569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090569">(Apr 11 2019 at 11:19)</a>:</h4>
<p>I was confused by something else in this example</p>



<a name="163090575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090575">(Apr 11 2019 at 11:19)</a>:</h4>
<p>because Local can't be in the middle</p>



<a name="163090578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090578">(Apr 11 2019 at 11:19)</a>:</h4>
<p>I meant, is not a projection</p>



<a name="163090581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090581">(Apr 11 2019 at 11:19)</a>:</h4>
<p>so the None plus using a base Local is enough in this case</p>



<a name="163090674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090674">(Apr 11 2019 at 11:21)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> basically any code that matched on <code>place</code> before, should now match on <code>place.projection</code></p>
</blockquote>
<p>anyway, I don't think this is that simple</p>



<a name="163090679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090679">(Apr 11 2019 at 11:21)</a>:</h4>
<p>:P</p>



<a name="163090680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090680">(Apr 11 2019 at 11:21)</a>:</h4>
<p>you can't ever have a local in the middle</p>



<a name="163090689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090689">(Apr 11 2019 at 11:21)</a>:</h4>
<p>yes</p>



<a name="163090692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090692">(Apr 11 2019 at 11:21)</a>:</h4>
<p>I mean, you can't :)</p>



<a name="163090697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090697">(Apr 11 2019 at 11:21)</a>:</h4>
<p>/me is confused</p>



<a name="163090745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090745">(Apr 11 2019 at 11:22)</a>:</h4>
<p>sorry, I meant you can't have a local in the middle</p>



<a name="163090747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090747">(Apr 11 2019 at 11:22)</a>:</h4>
<p>I'm very sure it is as simple as just matching on <code>place.projection</code></p>



<a name="163090749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090749">(Apr 11 2019 at 11:22)</a>:</h4>
<p>oh I got that</p>



<a name="163090750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090750">(Apr 11 2019 at 11:22)</a>:</h4>
<p>I was agreeing with you</p>



<a name="163090758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090758">(Apr 11 2019 at 11:22)</a>:</h4>
<p>I'm wondering whether you have encountered situations where you can't just match on <code>place.projection</code></p>



<a name="163090763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090763">(Apr 11 2019 at 11:22)</a>:</h4>
<p>I was thinking about Deref and Field but saw that the example I was pointing at you was about Local</p>



<a name="163090780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090780">(Apr 11 2019 at 11:23)</a>:</h4>
<blockquote>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">is_upvar_field_projection</span><span class="o">&lt;</span><span class="na">&#39;cx</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;gcx</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">mir</span>: <span class="kp">&amp;</span><span class="na">&#39;cx</span><span class="w"> </span><span class="n">Mir</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">                                                </span><span class="n">tcx</span>: <span class="kp">&amp;</span><span class="nc">TyCtxt</span><span class="o">&lt;</span><span class="na">&#39;cx</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;gcx</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Option</span><span class="o">&lt;</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="p">(</span><span class="n">place</span><span class="p">,</span><span class="w"> </span><span class="n">by_ref</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">Place</span>::<span class="n">Projection</span><span class="p">(</span><span class="k">ref</span><span class="w"> </span><span class="n">proj</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">ProjectionElem</span>::<span class="n">Deref</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">proj</span><span class="p">.</span><span class="n">elem</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="p">(</span><span class="o">&amp;</span><span class="n">proj</span><span class="p">.</span><span class="n">base</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="kc">false</span><span class="p">)</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="kc">false</span><span class="p">)</span><span class="w"></span>
<span class="w">        </span><span class="p">};</span><span class="w"></span>

<span class="w">        </span><span class="k">match</span><span class="w"> </span><span class="n">place</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">Place</span>::<span class="n">Projection</span><span class="p">(</span><span class="k">ref</span><span class="w"> </span><span class="n">proj</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="k">match</span><span class="w"> </span><span class="n">proj</span><span class="p">.</span><span class="n">elem</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="n">ProjectionElem</span>::<span class="n">Field</span><span class="p">(</span><span class="n">field</span><span class="p">,</span><span class="w"> </span><span class="n">_ty</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="kd">let</span><span class="w"> </span><span class="n">base_ty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">proj</span><span class="p">.</span><span class="n">base</span><span class="p">.</span><span class="n">ty</span><span class="p">(</span><span class="n">mir</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">tcx</span><span class="p">).</span><span class="n">ty</span><span class="p">;</span><span class="w"></span>

<span class="w">                    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">base_ty</span><span class="p">.</span><span class="n">is_closure</span><span class="p">()</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">base_ty</span><span class="p">.</span><span class="n">is_generator</span><span class="p">())</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"></span>
<span class="w">                        </span><span class="p">(</span><span class="o">!</span><span class="n">by_ref</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">mir</span><span class="p">.</span><span class="n">upvar_decls</span><span class="p">[</span><span class="n">field</span><span class="p">.</span><span class="n">index</span><span class="p">()].</span><span class="n">by_ref</span><span class="p">)</span><span class="w"></span>
<span class="w">                    </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="nb">Some</span><span class="p">(</span><span class="n">field</span><span class="p">)</span><span class="w"></span>
<span class="w">                    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="nb">None</span><span class="w"></span>
<span class="w">                    </span><span class="p">}</span><span class="w"></span>
<span class="w">                </span><span class="p">},</span><span class="w"></span>
<span class="w">                </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">            </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>


</blockquote>
<p>for instance, in this case ^^^</p>



<a name="163090794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090794">(Apr 11 2019 at 11:23)</a>:</h4>
<p>see the first <code>place</code> binding</p>



<a name="163090800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090800">(Apr 11 2019 at 11:23)</a>:</h4>
<p>that's = to self or self.base</p>



<a name="163090839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090839">(Apr 11 2019 at 11:24)</a>:</h4>
<p>those with the new code are a <code>Place</code> or a <code>PlaceBase</code></p>



<a name="163090847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090847">(Apr 11 2019 at 11:24)</a>:</h4>
<p>different types</p>



<a name="163090857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090857">(Apr 11 2019 at 11:24)</a>:</h4>
<p>I meant, is not that hard to fix that but it's not just matching in self.projection :P</p>



<a name="163090859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163090859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163090859">(Apr 11 2019 at 11:24)</a>:</h4>
<p>that's what I meant</p>



<a name="163091077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163091077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163091077">(Apr 11 2019 at 11:29)</a>:</h4>
<p>oh, that still works</p>



<a name="163091140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163091140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163091140">(Apr 11 2019 at 11:30)</a>:</h4>
<p>you match on <code>place.projection</code> and either return <code>place.projection</code> or <code>proj.base</code></p>



<a name="163091151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163091151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163091151">(Apr 11 2019 at 11:30)</a>:</h4>
<p>All this code does is eat one <code>Deref</code> if there was one</p>



<a name="163091201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163091201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163091201">(Apr 11 2019 at 11:31)</a>:</h4>
<p>In fact this is even easier, since the outer <code>if let</code> can be removed and you can just use <code>let proj = self.projection?;</code></p>



<a name="163091260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163091260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163091260">(Apr 11 2019 at 11:32)</a>:</h4>
<p>which will save you the redundant <code>match place</code> below.</p>



<a name="163091268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163091268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163091268">(Apr 11 2019 at 11:32)</a>:</h4>
<p>You should probably rename the <code>place</code> variable to <code>proj</code> though</p>



<a name="163091292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163091292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163091292">(Apr 11 2019 at 11:33)</a>:</h4>
<p>I sincerely hope my ramblings make any sense at all</p>



<a name="163091316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163091316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163091316">(Apr 11 2019 at 11:33)</a>:</h4>
<p>basically this entire function does not care about <code>self.base</code></p>



<a name="163093998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163093998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163093998">(Apr 11 2019 at 12:24)</a>:</h4>
<p>hey back</p>



<a name="163094006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163094006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163094006">(Apr 11 2019 at 12:24)</a>:</h4>
<p>ohh yes, your comments make a lot of sense</p>



<a name="163094007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163094007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163094007">(Apr 11 2019 at 12:24)</a>:</h4>
<p>thanks :)</p>



<a name="163104187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104187">(Apr 11 2019 at 14:25)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">    </span><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">is_upvar_field_projection</span><span class="o">&lt;</span><span class="na">&#39;cx</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;gcx</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">mir</span>: <span class="kp">&amp;</span><span class="na">&#39;cx</span><span class="w"> </span><span class="n">Mir</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">                                                </span><span class="n">tcx</span>: <span class="kp">&amp;</span><span class="nc">TyCtxt</span><span class="o">&lt;</span><span class="na">&#39;cx</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;gcx</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nb">Option</span><span class="o">&lt;</span><span class="n">Field</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="p">(</span><span class="n">opt_proj</span><span class="p">,</span><span class="w"> </span><span class="n">by_ref</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="n">proj</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">projection</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="n">ProjectionElem</span>::<span class="n">Deref</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">proj</span><span class="p">.</span><span class="n">elem</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="p">(</span><span class="n">proj</span><span class="p">.</span><span class="n">base</span><span class="p">,</span><span class="w"> </span><span class="kc">true</span><span class="p">)</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="p">(</span><span class="nb">Some</span><span class="p">(</span><span class="n">proj</span><span class="p">),</span><span class="w"> </span><span class="kc">false</span><span class="p">)</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="p">(</span><span class="nb">None</span><span class="p">,</span><span class="w"> </span><span class="kc">false</span><span class="p">)</span><span class="w"></span>
<span class="w">        </span><span class="p">};</span><span class="w"></span>

<span class="w">        </span><span class="k">match</span><span class="w"> </span><span class="n">opt_proj</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="nb">Some</span><span class="p">(</span><span class="k">ref</span><span class="w"> </span><span class="n">proj</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="k">match</span><span class="w"> </span><span class="n">proj</span><span class="p">.</span><span class="n">elem</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="n">ProjectionElem</span>::<span class="n">Field</span><span class="p">(</span><span class="n">field</span><span class="p">,</span><span class="w"> </span><span class="n">_ty</span><span class="p">)</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="kd">let</span><span class="w"> </span><span class="n">base_ty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="nb">Some</span><span class="p">(</span><span class="k">box</span><span class="w"> </span><span class="n">base</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">proj</span><span class="p">.</span><span class="n">base</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">place_ty</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">base</span><span class="p">.</span><span class="n">ty</span><span class="p">(</span><span class="n">mir</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">tcx</span><span class="p">);</span><span class="w"></span>
<span class="w">                        </span><span class="n">place_ty</span><span class="p">.</span><span class="n">projection_ty</span><span class="p">(</span><span class="o">*</span><span class="n">tcx</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">base</span><span class="p">.</span><span class="n">elem</span><span class="p">).</span><span class="n">ty</span><span class="w"></span>
<span class="w">                    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="bp">self</span><span class="p">.</span><span class="n">base</span><span class="p">.</span><span class="n">ty</span><span class="p">(</span><span class="n">mir</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">tcx</span><span class="p">).</span><span class="n">ty</span><span class="w"></span>
<span class="w">                    </span><span class="p">};</span><span class="w"></span>

<span class="w">                    </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">base_ty</span><span class="p">.</span><span class="n">is_closure</span><span class="p">()</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">base_ty</span><span class="p">.</span><span class="n">is_generator</span><span class="p">())</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"></span>
<span class="w">                        </span><span class="p">(</span><span class="o">!</span><span class="n">by_ref</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">mir</span><span class="p">.</span><span class="n">upvar_decls</span><span class="p">[</span><span class="n">field</span><span class="p">.</span><span class="n">index</span><span class="p">()].</span><span class="n">by_ref</span><span class="p">)</span><span class="w"></span>
<span class="w">                    </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="nb">Some</span><span class="p">(</span><span class="n">field</span><span class="p">)</span><span class="w"></span>
<span class="w">                    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="nb">None</span><span class="w"></span>
<span class="w">                    </span><span class="p">}</span><span class="w"></span>
<span class="w">                </span><span class="p">},</span><span class="w"></span>
<span class="w">                </span><span class="n">_</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">            </span><span class="nb">None</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="163104196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104196">(Apr 11 2019 at 14:25)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> back to this thing :)</p>



<a name="163104207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104207">(Apr 11 2019 at 14:25)</a>:</h4>
<p>this would be the straightforward way to translate that method</p>



<a name="163104211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104211">(Apr 11 2019 at 14:25)</a>:</h4>
<p>which sucks a lot</p>



<a name="163104235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104235">(Apr 11 2019 at 14:25)</a>:</h4>
<p>well actually the original method had a lot to improve</p>



<a name="163104297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104297">(Apr 11 2019 at 14:26)</a>:</h4>
<p>but I guess it's not wise to refactor methods meanwhile doing this</p>



<a name="163104579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104579">(Apr 11 2019 at 14:29)</a>:</h4>
<p>that's not too bad</p>



<a name="163104583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104583">(Apr 11 2019 at 14:29)</a>:</h4>
<p>a bad part about the new thing is that is not that direct to get the ty of a <code>PlaceProjection</code> self.base was before a <code>Place</code> so we could just call ty</p>



<a name="163104591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104591">(Apr 11 2019 at 14:29)</a>:</h4>
<p>add a FIXME about cleaning it up?</p>



<a name="163104635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104635">(Apr 11 2019 at 14:30)</a>:</h4>
<p>now we need to do the dance I've done</p>



<a name="163104642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104642">(Apr 11 2019 at 14:30)</a>:</h4>
<p>yes</p>



<a name="163104647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104647">(Apr 11 2019 at 14:30)</a>:</h4>
<p>let me push again what I have</p>



<a name="163104658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104658">(Apr 11 2019 at 14:30)</a>:</h4>
<p>I'm going to be pushing WIP 1/2/3 etc so it's easier for you to review</p>



<a name="163104669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104669">(Apr 11 2019 at 14:30)</a>:</h4>
<p>oh, that type extraction... hmm</p>



<a name="163104692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104692">(Apr 11 2019 at 14:31)</a>:</h4>
<p>the thing I'm going to push has amended already what I've pushed yesterday</p>



<a name="163104723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104723">(Apr 11 2019 at 14:31)</a>:</h4>
<p>I've just realized that would be easier if I keep pushing things and at the end I do a huge squash</p>



<a name="163104732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104732">(Apr 11 2019 at 14:31)</a>:</h4>
<p>just to simplify you following up the discussions and changes</p>



<a name="163104756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104756">(Apr 11 2019 at 14:31)</a>:</h4>
<blockquote>
<p>oh, that type extraction... hmm</p>
</blockquote>
<p>I thought about adding a <code>ty</code> method to <code>PlaceProjection</code></p>



<a name="163104772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104772">(Apr 11 2019 at 14:32)</a>:</h4>
<p>the problem is that I need <code>PlaceBase</code> :)</p>



<a name="163104865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104865">(Apr 11 2019 at 14:32)</a>:</h4>
<p>or maybe better to add a base_ty to Place</p>



<a name="163104872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104872">(Apr 11 2019 at 14:32)</a>:</h4>
<p>or super_ty</p>



<a name="163104942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104942">(Apr 11 2019 at 14:33)</a>:</h4>
<p>which goes one step up and if there's a base projection it uses that otherwise goes to <code>PlaceBase</code></p>



<a name="163104960"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104960" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104960">(Apr 11 2019 at 14:33)</a>:</h4>
<p>I'm not liking that much to talk about base in both cases</p>



<a name="163104984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163104984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163104984">(Apr 11 2019 at 14:34)</a>:</h4>
<p>yea, it's weird</p>



<a name="163105024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105024">(Apr 11 2019 at 14:34)</a>:</h4>
<p>there's <code>PlaceBase</code> root base and there's the <code>base</code> field in <code>PlaceProjection</code></p>



<a name="163105056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105056">(Apr 11 2019 at 14:34)</a>:</h4>
<blockquote>
<p>yea, it's weird</p>
</blockquote>
<p>what's weird from all that I've said? :P, everything :P</p>



<a name="163105153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105153">(Apr 11 2019 at 14:35)</a>:</h4>
<p>the one in the projection is less <code>base</code> and more <code>outer_projection</code> or sth</p>



<a name="163105165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105165">(Apr 11 2019 at 14:35)</a>:</h4>
<p>yes</p>



<a name="163105235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105235">(Apr 11 2019 at 14:36)</a>:</h4>
<p>I guess I can add a rename this fixme</p>



<a name="163105250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105250">(Apr 11 2019 at 14:36)</a>:</h4>
<p>I think doing that now will cause some pain?</p>



<a name="163105259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105259">(Apr 11 2019 at 14:36)</a>:</h4>
<p>hmmm do you think it worth?</p>



<a name="163105265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105265">(Apr 11 2019 at 14:36)</a>:</h4>
<p>maybe it does to do all now</p>



<a name="163105507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105507">(Apr 11 2019 at 14:39)</a>:</h4>
<p>yea, either do it now or never</p>



<a name="163105527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105527">(Apr 11 2019 at 14:39)</a>:</h4>
<p>ok, gonna change that</p>



<a name="163105528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105528">(Apr 11 2019 at 14:39)</a>:</h4>
<p>that field won't exist for long</p>



<a name="163105541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105541">(Apr 11 2019 at 14:39)</a>:</h4>
<p>ahh right, so it doesn't worth then</p>



<a name="163105613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105613">(Apr 11 2019 at 14:40)</a>:</h4>
<blockquote>
<p>or maybe better to add a base_ty to Place</p>
</blockquote>
<p>does this worth?</p>



<a name="163105633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105633">(Apr 11 2019 at 14:40)</a>:</h4>
<p>it's not technically base</p>



<a name="163105657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105657">(Apr 11 2019 at 14:40)</a>:</h4>
<div class="codehilite"><pre><span></span>-                    let base_ty = proj.base.ty(mir, *tcx).ty;
+                    let base_ty = if let Some(box base) = proj.base {
+                        let mut place_ty = self.base.ty(mir, *tcx);
+                        place_ty.projection_ty(*tcx, &amp;base.elem).ty
+                    } else {
+                        self.base.ty(mir, *tcx).ty
+                    };
</pre></div>



<a name="163105670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105670">(Apr 11 2019 at 14:40)</a>:</h4>
<p>it's a method that solves that if stuff</p>



<a name="163105684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105684">(Apr 11 2019 at 14:41)</a>:</h4>
<p>basically getting the ty of one level up</p>



<a name="163105704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163105704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163105704">(Apr 11 2019 at 14:41)</a>:</h4>
<p>so outer_projection or base</p>



<a name="163106042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163106042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163106042">(Apr 11 2019 at 14:44)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> that's what it is for now <a href="https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3" target="_blank" title="https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3">https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3</a></p>



<a name="163106331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163106331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163106331">(Apr 11 2019 at 14:47)</a>:</h4>
<p>hmm... what if you made it <code>let mut base_ty = self.base.ty(mir, *tcx); if let Some(base) = &amp;proj.base { base_ty = base_ty.projection_ty(*tcx, &amp;base.elem); }</code>?</p>



<a name="163106344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163106344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163106344">(Apr 11 2019 at 14:47)</a>:</h4>
<p>not sure what the return type of <code>projection_ty</code> is</p>



<a name="163107434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163107434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163107434">(Apr 11 2019 at 14:58)</a>:</h4>
<p>yeah that works</p>



<a name="163107697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163107697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163107697">(Apr 11 2019 at 15:01)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="124288">oli</span> that's what it is for now <a href="https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3" target="_blank" title="https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3">https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3</a></p>
</blockquote>
<p>on top of this for you to review, I've pushed that change here <a href="https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1" target="_blank" title="https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1">https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1</a></p>



<a name="163115435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163115435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163115435">(Apr 11 2019 at 16:28)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> another similar thing ...</p>



<a name="163115482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163115482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163115482">(Apr 11 2019 at 16:29)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">            </span><span class="k">fn</span> <span class="nf">super_projection</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"></span>
<span class="w">                                </span><span class="n">proj</span>: <span class="kp">&amp;</span> <span class="cp">$($mutability</span><span class="p">)</span><span class="o">?</span><span class="w"> </span><span class="n">PlaceProjection</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">                                </span><span class="n">context</span>: <span class="nc">PlaceContext</span><span class="o">&lt;</span><span class="na">&#39;tcx</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">                                </span><span class="n">location</span>: <span class="nc">Location</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">Projection</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">base</span><span class="p">,</span><span class="w"> </span><span class="n">elem</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">proj</span><span class="p">;</span><span class="w"></span>
<span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="n">context</span><span class="p">.</span><span class="n">is_mutating_use</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="n">PlaceContext</span>::<span class="n">MutatingUse</span><span class="p">(</span><span class="n">MutatingUseContext</span>::<span class="n">Projection</span><span class="p">)</span><span class="w"></span>
<span class="w">                </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="n">PlaceContext</span>::<span class="n">NonMutatingUse</span><span class="p">(</span><span class="n">NonMutatingUseContext</span>::<span class="n">Projection</span><span class="p">)</span><span class="w"></span>
<span class="w">                </span><span class="p">};</span><span class="w"></span>
<span class="w">                </span><span class="bp">self</span><span class="p">.</span><span class="n">visit_place</span><span class="p">(</span><span class="n">base</span><span class="p">,</span><span class="w"> </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">);</span><span class="w"></span>
<span class="w">                </span><span class="bp">self</span><span class="p">.</span><span class="n">visit_projection_elem</span><span class="p">(</span><span class="n">elem</span><span class="p">,</span><span class="w"> </span><span class="n">location</span><span class="p">);</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
</pre></div>



<a name="163115530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163115530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163115530">(Apr 11 2019 at 16:29)</a>:</h4>
<p><code>visit_place</code> takes base which is not a <code>Place</code> anymore, right now it's a <code>PlaceProjection</code></p>



<a name="163115608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163115608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163115608">(Apr 11 2019 at 16:30)</a>:</h4>
<p>I'm not sure how did you envision to play with this stuff</p>



<a name="163115624"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163115624" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163115624">(Apr 11 2019 at 16:30)</a>:</h4>
<p>should I just have visit_place_projection thing?</p>



<a name="163115709"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163115709" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163115709">(Apr 11 2019 at 16:32)</a>:</h4>
<p>well there's already one, going to play with this for a bit to see if things end in an equivalent way :)</p>



<a name="163125128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163125128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163125128">(Apr 11 2019 at 18:26)</a>:</h4>
<p>depends on the users...</p>



<a name="163125162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163125162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163125162">(Apr 11 2019 at 18:26)</a>:</h4>
<p>can we get away with not calling <code>visit_place</code> here?</p>



<a name="163125231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163125231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163125231">(Apr 11 2019 at 18:27)</a>:</h4>
<p>if the users don't care about order, just completeness, we can easily reshuffle this</p>



<a name="163125334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163125334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163125334">(Apr 11 2019 at 18:28)</a>:</h4>
<p>basically replace the <code>self.visit_place</code> call with <code>if let Some(proj) = proj.base { self.visit_projection(proj, context, location); }</code></p>



<a name="163125397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163125397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163125397">(Apr 11 2019 at 18:29)</a>:</h4>
<p>The only situation where we'd call <code>visit_place</code> would be wherever the visitor is processing the actual <code>Place</code> type and then we call it on the <code>PlaceBase</code> there</p>



<a name="163126058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163126058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163126058">(Apr 11 2019 at 18:36)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> in that particular place I've added a visit_place_base</p>



<a name="163126074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163126074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163126074">(Apr 11 2019 at 18:37)</a>:</h4>
<p>made visit_place adapt to that</p>



<a name="163126087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163126087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163126087">(Apr 11 2019 at 18:37)</a>:</h4>
<p>ah, that makes sense</p>



<a name="163126090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163126090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163126090">(Apr 11 2019 at 18:37)</a>:</h4>
<p>maybe better if I push this :)</p>



<a name="163126091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163126091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163126091">(Apr 11 2019 at 18:37)</a>:</h4>
<p>ok</p>



<a name="163126105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163126105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163126105">(Apr 11 2019 at 18:37)</a>:</h4>
<div class="codehilite"><pre><span></span>@@ -725,19 +732,27 @@ macro_rules! make_mir_visitor {
                             place: &amp; $($mutability)? Place&lt;&#39;tcx&gt;,
                             context: PlaceContext&lt;&#39;tcx&gt;,
                             location: Location) {
+                let Place { base, projection } = place;
+
+                self.visit_place_base(base, context, location);
+
+                if let Some(proj) = projection {
+                    self.visit_projection(proj, context, location);
+                }
+            }
</pre></div>



<a name="163126114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163126114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163126114">(Apr 11 2019 at 18:37)</a>:</h4>
<p>that's visit_place</p>



<a name="163126176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163126176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163126176">(Apr 11 2019 at 18:38)</a>:</h4>
<p>well super_place, but you got what I meant :P</p>



<a name="163126181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163126181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163126181">(Apr 11 2019 at 18:38)</a>:</h4>
<p>the default implementation of visit_place</p>



<a name="163126189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163126189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163126189">(Apr 11 2019 at 18:38)</a>:</h4>
<p>found weird that, that's called super :)</p>



<a name="163127125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163127125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163127125">(Apr 11 2019 at 18:50)</a>:</h4>
<p>heh, half the compiler uses <code>super_*</code> the other half uses <code>walk_*</code></p>



<a name="163129531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163129531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163129531">(Apr 11 2019 at 19:23)</a>:</h4>
<p>:)</p>



<a name="163129561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163129561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163129561">(Apr 11 2019 at 19:23)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> as soon as you have time to review something let me know and I can push</p>



<a name="163129629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163129629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163129629">(Apr 11 2019 at 19:24)</a>:</h4>
<p>there are already two WIP X commits up and I have a bunch of things in locally</p>



<a name="163129696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163129696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163129696">(Apr 11 2019 at 19:25)</a>:</h4>
<p>btw ...</p>



<a name="163129711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163129711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163129711">(Apr 11 2019 at 19:25)</a>:</h4>
<div class="codehilite"><pre><span></span>         &amp;mut self,
         mir_place: &amp;mir::Place&lt;&#39;tcx&gt;
     ) -&gt; EvalResult&lt;&#39;tcx, PlaceTy&lt;&#39;tcx, M::PointerTag&gt;&gt; {
-        use rustc::mir::Place::*;
         use rustc::mir::PlaceBase;
         let place = match *mir_place {
-            Base(PlaceBase::Local(mir::RETURN_PLACE)) =&gt; match self.frame().return_place {
+            Place {
+                base: PlaceBase::Local(mir::RETURN_PLACE),
+                projection: None,
+            } =&gt; match self.frame().return_place {
                 Some(return_place) =&gt;
                     // We use our layout to verify our assumption; caller will validate
                     // their layout on return.
@@ -638,7 +645,10 @@ where
                     },
                 None =&gt; return err!(InvalidNullPointerUsage),
             },
-            Base(PlaceBase::Local(local)) =&gt; PlaceTy {
+            Place {
+                base: PlaceBase::Local(local),
+                projection: None,
+            } =&gt; PlaceTy {
                 place: Place::Local {
                     frame: self.cur_frame(),
                     local,
@@ -646,7 +656,10 @@ where
                 layout: self.layout_of_local(self.frame(), local, None)?,
             },

-            Projection(ref proj) =&gt; {
+            Place {
+                base: _,
+                projection: Some(ref proj),
+            } =&gt; {
                 let place = self.eval_place(&amp;proj.base)?;
                 self.place_projection(place, &amp;proj.elem)?
             }
</pre></div>



<a name="163129712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163129712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163129712">(Apr 11 2019 at 19:25)</a>:</h4>
<p>I hate this kind of changes :P</p>



<a name="163129728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163129728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163129728">(Apr 11 2019 at 19:25)</a>:</h4>
<p>I could match on place.base and place.projection and make some things simpler but some other things worser :/</p>



<a name="163129814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163129814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163129814">(Apr 11 2019 at 19:27)</a>:</h4>
<p>I guess if I were trying to write better code on this design I'd split everything into something_place_base and something_projection methods but I don't think that worth given that this is going to be also changed ... so ... I guess the kind of diff I've pasted above is ok</p>



<a name="163129830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163129830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163129830">(Apr 11 2019 at 19:27)</a>:</h4>
<p>anyway, let me know if it's not :)</p>



<a name="163132079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163132079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163132079">(Apr 11 2019 at 20:00)</a>:</h4>
<p>yea, lgtm</p>



<a name="163132100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163132100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163132100">(Apr 11 2019 at 20:01)</a>:</h4>
<p>I won't be able to review a lot until monday</p>



<a name="163132116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163132116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163132116">(Apr 11 2019 at 20:01)</a>:</h4>
<p>I'll try to find some time though, will be async most likely, so feel free to commit stuff and link me to it</p>



<a name="163133234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163133234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163133234">(Apr 11 2019 at 20:14)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="163133244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163133244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163133244">(Apr 11 2019 at 20:14)</a>:</h4>
<p>unsure if you've already seen but ...</p>



<a name="163133294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163133294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163133294">(Apr 11 2019 at 20:15)</a>:</h4>
<p>1. <a href="https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3" target="_blank" title="https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3">https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3</a><br>
2. <a href="https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1" target="_blank" title="https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1">https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1</a><br>
3. <a href="https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271" target="_blank" title="https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271">https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271</a></p>



<a name="163133324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163133324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163133324">(Apr 11 2019 at 20:16)</a>:</h4>
<p>the first two are things that I've shared already, 3 just pushed</p>



<a name="163133384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163133384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163133384">(Apr 11 2019 at 20:16)</a>:</h4>
<p>anyway, now on I think most changes are mechanical</p>



<a name="163133396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163133396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163133396">(Apr 11 2019 at 20:16)</a>:</h4>
<p>a LOT though :P</p>



<a name="163380515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163380515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163380515">(Apr 15 2019 at 13:46)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> you around?</p>



<a name="163380569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163380569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163380569">(Apr 15 2019 at 13:47)</a>:</h4>
<blockquote>
<p>1. <a href="https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3" target="_blank" title="https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3">https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3</a><br>
2. <a href="https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1" target="_blank" title="https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1">https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1</a><br>
3. <a href="https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271" target="_blank" title="https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271">https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271</a></p>
</blockquote>
<p>were you able to check all these?</p>



<a name="163380577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163380577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163380577">(Apr 15 2019 at 13:47)</a>:</h4>
<p>I have more stuff locally</p>



<a name="163380756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163380756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163380756">(Apr 15 2019 at 13:48)</a>:</h4>
<p>sorry, didn't see it and I gotta run in a minute</p>



<a name="163380770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163380770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163380770">(Apr 15 2019 at 13:49)</a>:</h4>
<p>no worries</p>



<a name="163380783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163380783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163380783">(Apr 15 2019 at 13:49)</a>:</h4>
<p>when you can let me know</p>



<a name="163380810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163380810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163380810">(Apr 15 2019 at 13:49)</a>:</h4>
<p>I'm not blocked or anything like that</p>



<a name="163381296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163381296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163381296">(Apr 15 2019 at 13:54)</a>:</h4>
<p>1. <a href="https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3" target="_blank" title="https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3">https://github.com/spastorino/rust/commit/38e66f7397599d48a78aebcf23e2d4fb3485a9a3</a><br>
2. <a href="https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1" target="_blank" title="https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1">https://github.com/spastorino/rust/commit/fc3faa5d7def51227fae05ae43e1de0e397a05c1</a><br>
3. <a href="https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271" target="_blank" title="https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271">https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271</a><br>
4. <a href="https://github.com/spastorino/rust/commit/2d800f96b43dded0484a68f9703cd056c8e06464" target="_blank" title="https://github.com/spastorino/rust/commit/2d800f96b43dded0484a68f9703cd056c8e06464">https://github.com/spastorino/rust/commit/2d800f96b43dded0484a68f9703cd056c8e06464</a></p>



<a name="163381327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163381327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163381327">(Apr 15 2019 at 13:55)</a>:</h4>
<p>I think you've already checked <code>1</code></p>



<a name="163403254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163403254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163403254">(Apr 15 2019 at 18:20)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> one question ...</p>



<a name="163403272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163403272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163403272">(Apr 15 2019 at 18:20)</a>:</h4>
<p>I'm getting a lot of <code>Place</code> expected <code>Option</code> found errors</p>



<a name="163403303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163403303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163403303">(Apr 15 2019 at 18:21)</a>:</h4>
<p>thing is when you are in a projection and do base to go up</p>



<a name="163403335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163403335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163403335">(Apr 15 2019 at 18:21)</a>:</h4>
<p>but the problem with that is that I need the base inside projection if it's <code>Some(..)</code></p>



<a name="163403343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163403343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163403343">(Apr 15 2019 at 18:21)</a>:</h4>
<p>otherwise I need the <code>PlaceBase</code></p>



<a name="163403408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163403408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163403408">(Apr 15 2019 at 18:22)</a>:</h4>
<p>I was thinking about doing a method for that but the problem is that those are different types</p>



<a name="163403482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163403482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163403482">(Apr 15 2019 at 18:23)</a>:</h4>
<p>and if I don't solve that in this way I'd need to check if base is <code>Some</code> otherwise go to the top base</p>



<a name="163403500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163403500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163403500">(Apr 15 2019 at 18:23)</a>:</h4>
<p>gonna do that for now but those may end being a lot of changes to rollback :/</p>



<a name="163403766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163403766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163403766">(Apr 15 2019 at 18:26)</a>:</h4>
<p>for instance base here <a href="https://github.com/rust-lang/rust/blob/2d800f96b43dded0484a68f9703cd056c8e06464/src/librustc_mir/borrow_check/mod.rs#L1750-L1757" target="_blank" title="https://github.com/rust-lang/rust/blob/2d800f96b43dded0484a68f9703cd056c8e06464/src/librustc_mir/borrow_check/mod.rs#L1750-L1757">https://github.com/rust-lang/rust/blob/2d800f96b43dded0484a68f9703cd056c8e06464/src/librustc_mir/borrow_check/mod.rs#L1750-L1757</a></p>



<a name="163403807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163403807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163403807">(Apr 15 2019 at 18:27)</a>:</h4>
<p>and on top of that, next problem is that <a href="https://github.com/rust-lang/rust/blob/2d800f96b43dded0484a68f9703cd056c8e06464/src/librustc_mir/borrow_check/mod.rs#L1751" target="_blank" title="https://github.com/rust-lang/rust/blob/2d800f96b43dded0484a68f9703cd056c8e06464/src/librustc_mir/borrow_check/mod.rs#L1751">https://github.com/rust-lang/rust/blob/2d800f96b43dded0484a68f9703cd056c8e06464/src/librustc_mir/borrow_check/mod.rs#L1751</a> takes a Place but I don't have a Place anymore</p>



<a name="163403839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163403839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163403839">(Apr 15 2019 at 18:27)</a>:</h4>
<p>I wonder if we need to define a trait to solve that</p>



<a name="163404258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404258">(Apr 15 2019 at 18:32)</a>:</h4>
<p>hmm... I was thinking that we should pass down the <code>PlaceBase</code> wherever the final <code>None</code> needs a <code>PlaceBase</code></p>



<a name="163404293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404293">(Apr 15 2019 at 18:32)</a>:</h4>
<p>(or convert whatever is happening to use the <code>unroll</code> code)</p>



<a name="163404313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404313">(Apr 15 2019 at 18:33)</a>:</h4>
<p>didn't understand what you meant</p>



<a name="163404367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404367">(Apr 15 2019 at 18:33)</a>:</h4>
<p>you were thinking that instead of passing down base, we should pass everything? included the <code>PlaceBase</code>?</p>



<a name="163404455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404455">(Apr 15 2019 at 18:34)</a>:</h4>
<p>So if I understand you correctly, after traversing the "Projection-Linked-List", when you end up with the <code>None</code>, that's where you used to have the <code>Place::Base</code> instead of another <code>Place::Projection</code></p>



<a name="163404485"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404485" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404485">(Apr 15 2019 at 18:35)</a>:</h4>
<p>let me explain it simpler</p>



<a name="163404501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404501">(Apr 15 2019 at 18:35)</a>:</h4>
<p>In order to achieve the same behaviour, whatever code matches on the <code>proj.base</code> field, needs to also know about the actual <code>PlaceBase</code> that the <code>Place</code> has</p>



<a name="163404515"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404515" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404515">(Apr 15 2019 at 18:35)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/2d800f96b43dded0484a68f9703cd056c8e06464/src/librustc_mir/borrow_check/mod.rs#L1750-L1757" target="_blank" title="https://github.com/rust-lang/rust/blob/2d800f96b43dded0484a68f9703cd056c8e06464/src/librustc_mir/borrow_check/mod.rs#L1750-L1757">https://github.com/rust-lang/rust/blob/2d800f96b43dded0484a68f9703cd056c8e06464/src/librustc_mir/borrow_check/mod.rs#L1750-L1757</a></p>



<a name="163404537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404537">(Apr 15 2019 at 18:35)</a>:</h4>
<p>ok, so you meant that I should pass to those methods both things?</p>



<a name="163404634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404634">(Apr 15 2019 at 18:36)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="w">                             </span><span class="bp">self</span><span class="p">.</span><span class="n">check_if_full_path_is_moved</span><span class="p">(</span><span class="w"></span>
<span class="w">                                 </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">InitializationRequiringAction</span>::<span class="n">Use</span><span class="p">,</span><span class="w"></span>
<span class="w">                                 </span><span class="p">(</span><span class="n">place</span><span class="p">.</span><span class="n">base</span><span class="p">,</span><span class="w"> </span><span class="n">base</span><span class="p">,</span><span class="w"> </span><span class="n">span</span><span class="p">),</span><span class="w"> </span><span class="n">flow_state</span><span class="p">);</span><span class="w"></span>
</pre></div>



<a name="163404637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404637">(Apr 15 2019 at 18:36)</a>:</h4>
<p>something like this?</p>



<a name="163404693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404693">(Apr 15 2019 at 18:38)</a>:</h4>
<p>yes that. It's essentially what was passed down before</p>



<a name="163404759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404759">(Apr 15 2019 at 18:38)</a>:</h4>
<p>yep</p>



<a name="163404777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163404777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163404777">(Apr 15 2019 at 18:38)</a>:</h4>
<p>ok</p>



<a name="163405016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163405016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163405016">(Apr 15 2019 at 18:41)</a>:</h4>
<p><code>place.base</code> is private :(</p>



<a name="163405034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163405034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163405034">(Apr 15 2019 at 18:41)</a>:</h4>
<p>wonder if I should do those crate visible or just expose methods</p>



<a name="163405825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163405825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163405825">(Apr 15 2019 at 18:50)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> I wonder what about ...</p>



<a name="163405850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163405850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163405850">(Apr 15 2019 at 18:51)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="bp">self</span><span class="p">.</span><span class="n">check_if_full_path_is_moved</span><span class="p">(</span><span class="w"></span>
<span class="w">    </span><span class="n">context</span><span class="p">,</span><span class="w"> </span><span class="n">InitializationRequiringAction</span>::<span class="n">Use</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">(</span><span class="o">&amp;</span><span class="n">Place</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">base</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">projection</span>: <span class="o">*</span><span class="n">proj_base</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">},</span><span class="w"> </span><span class="n">span</span><span class="p">),</span><span class="w"> </span><span class="n">flow_state</span><span class="p">);</span><span class="w"></span>
</pre></div>



<a name="163406795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163406795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163406795">(Apr 15 2019 at 19:02)</a>:</h4>
<p>that constructs new places, which is probably very expensive (boxes and such)</p>



<a name="163406855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163406855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163406855">(Apr 15 2019 at 19:03)</a>:</h4>
<p>Most of this stuff will in the future get a base and a slice of the rest of the projections</p>



<a name="163406874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163406874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163406874">(Apr 15 2019 at 19:03)</a>:</h4>
<p>so right now it needs the base and the "linked list" of projections</p>



<a name="163407011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163407011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163407011">(Apr 15 2019 at 19:05)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="163407126"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163407126" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163407126">(Apr 15 2019 at 19:06)</a>:</h4>
<p>the other kind of recurrent thing I'm seeing is the thing with the type</p>



<a name="163407158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163407158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163407158">(Apr 15 2019 at 19:07)</a>:</h4>
<p>getting the type of the projection or the type of the base if the proj is <code>None</code></p>



<a name="163407181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163407181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163407181">(Apr 15 2019 at 19:07)</a>:</h4>
<p>I guess I can add those 4 or 5 lines of code everywhere but ... hmmm</p>



<a name="163410636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163410636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163410636">(Apr 15 2019 at 19:53)</a>:</h4>
<p>hmm... maybe make the <code>ProjectionElem::ty</code> method take a <code>PlaceBase</code>, too?</p>



<a name="163421816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163421816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163421816">(Apr 15 2019 at 22:27)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> that's weird from my point of view</p>



<a name="163421984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163421984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163421984">(Apr 15 2019 at 22:30)</a>:</h4>
<p>wouldn't be better to have something like <code>Place::ty(base: &amp;PlaceBase, elem: &amp;ProjectionElem)</code>?</p>



<a name="163447794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163447794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163447794">(Apr 16 2019 at 07:39)</a>:</h4>
<p>sgtm</p>



<a name="163492241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163492241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163492241">(Apr 16 2019 at 18:05)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> one thing that I wonder is ... we are going to start passing down as we said yesterday <code>PlaceBase</code> and <code>PlaceProjection</code></p>



<a name="163492271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163492271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163492271">(Apr 16 2019 at 18:05)</a>:</h4>
<p>I guess we need to pass down <code>Option&lt;Box&lt;PlaceProjection&gt;&gt;</code> really</p>



<a name="163492284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163492284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163492284">(Apr 16 2019 at 18:05)</a>:</h4>
<p>and wonder if we should have a type alias for that or something</p>



<a name="163492370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163492370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163492370">(Apr 16 2019 at 18:06)</a>:</h4>
<p>I'm probably going to take one path and see how goes but if you know beforehand you could save me some time :D</p>



<a name="163492397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163492397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163492397">(Apr 16 2019 at 18:06)</a>:</h4>
<p>going to pass the <code>Option&lt;Box&lt;PlaceProjection&gt;&gt;</code> down</p>



<a name="163495737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163495737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163495737">(Apr 16 2019 at 18:45)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> I also keep wordering if it's not easier to build a <code>Place</code> back</p>



<a name="163495800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163495800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163495800">(Apr 16 2019 at 18:46)</a>:</h4>
<p>I know it's problematic because of performance</p>



<a name="163495816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163495816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163495816">(Apr 16 2019 at 18:46)</a>:</h4>
<p>yea, I'd rather not do that</p>



<a name="163495821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163495821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163495821">(Apr 16 2019 at 18:46)</a>:</h4>
<p>but I think it may be easier as an intermediate step</p>



<a name="163495831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163495831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163495831">(Apr 16 2019 at 18:46)</a>:</h4>
<p>I mean, just a previous commit in the same PR</p>



<a name="163495867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163495867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163495867">(Apr 16 2019 at 18:46)</a>:</h4>
<p>if you can get rid of it within the same PR, sure</p>



<a name="163495868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163495868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163495868">(Apr 16 2019 at 18:46)</a>:</h4>
<p>this is a massive change</p>



<a name="163495891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163495891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163495891">(Apr 16 2019 at 18:47)</a>:</h4>
<p>what do you think? :)</p>



<a name="163495927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163495927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163495927">(Apr 16 2019 at 18:47)</a>:</h4>
<p>your idea was ... as I saw saying a bit before, to pass <code>PlaceBase</code> and <code>Option&lt;Box&lt;PlaceProjection&gt;&gt;</code> all the way down?</p>



<a name="163495930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163495930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163495930">(Apr 16 2019 at 18:47)</a>:</h4>
<p>as long as at the end of the PR we don't have any temporary Places and allocations that are created and thrown away, as an intermediate step that's perfectly alright</p>



<a name="163496003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163496003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163496003">(Apr 16 2019 at 18:48)</a>:</h4>
<p>ok</p>



<a name="163496011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163496011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163496011">(Apr 16 2019 at 18:48)</a>:</h4>
<p>and if I follow the other approach</p>



<a name="163496019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163496019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163496019">(Apr 16 2019 at 18:48)</a>:</h4>
<blockquote>
<p>your idea was ... as I saw saying a bit before, to pass <code>PlaceBase</code> and <code>Option&lt;Box&lt;PlaceProjection&gt;&gt;</code> all the way down?</p>
</blockquote>
<p>this <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span> was the idea, right?</p>



<a name="163496092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163496092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163496092">(Apr 16 2019 at 18:49)</a>:</h4>
<p>yes</p>



<a name="163496184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163496184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163496184">(Apr 16 2019 at 18:50)</a>:</h4>
<p>I mean you can use a type alias or a new type or even make <code>Place</code> generic over <code>AsRef&lt;PlaceProjection&gt;</code> or sth if that is more usable</p>



<a name="163565357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163565357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163565357">(Apr 17 2019 at 14:26)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> was going over your review</p>



<a name="163565358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163565358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163565358">(Apr 17 2019 at 14:26)</a>:</h4>
<p><a href="https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271#commitcomment-33214690" target="_blank" title="https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271#commitcomment-33214690">https://github.com/spastorino/rust/commit/d308b77860c6fced35cf43b7417b12648e503271#commitcomment-33214690</a></p>



<a name="163565384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163565384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163565384">(Apr 17 2019 at 14:26)</a>:</h4>
<p>I guess <code>PlaceBase</code> can't be <code>Copy</code> because we want the <code>Box</code></p>



<a name="163565477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163565477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163565477">(Apr 17 2019 at 14:27)</a>:</h4>
<p>oh right</p>



<a name="163578186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163578186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163578186">(Apr 17 2019 at 16:37)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> about <a href="https://github.com/spastorino/rust/commit/2d800f96b43dded0484a68f9703cd056c8e06464#r33209896" target="_blank" title="https://github.com/spastorino/rust/commit/2d800f96b43dded0484a68f9703cd056c8e06464#r33209896">https://github.com/spastorino/rust/commit/2d800f96b43dded0484a68f9703cd056c8e06464#r33209896</a></p>



<a name="163578247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163578247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163578247">(Apr 17 2019 at 16:38)</a>:</h4>
<p>I think we need to merge the iter thing first, right?</p>



<a name="163578273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163578273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163578273">(Apr 17 2019 at 16:38)</a>:</h4>
<p>seems like we are in the need of iterating over in several parts</p>



<a name="163615161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163615161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163615161">(Apr 18 2019 at 01:18)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> in case you agree we need to merge the iterator thing first, here is the thing <a href="https://github.com/rust-lang/rust/pull/60063" target="_blank" title="https://github.com/rust-lang/rust/pull/60063">https://github.com/rust-lang/rust/pull/60063</a></p>



<a name="163615165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163615165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163615165">(Apr 18 2019 at 01:18)</a>:</h4>
<p>don't remember if you wanted something else in that PR</p>



<a name="163615188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163615188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163615188">(Apr 18 2019 at 01:19)</a>:</h4>
<p>we could migrate more things to use iter(), implement things in terms of that and then in the struct thing just change the iter() impl and get along with it</p>



<a name="163615190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163615190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163615190">(Apr 18 2019 at 01:19)</a>:</h4>
<p>that was your idea?</p>



<a name="163615196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163615196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163615196">(Apr 18 2019 at 01:19)</a>:</h4>
<p>can you give one example of how that would look like?</p>



<a name="163645177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163645177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163645177">(Apr 18 2019 at 12:13)</a>:</h4>
<p>The iterator PR lgtm, we can merge that as it is. I was thinking of the <code>Debug</code> impl of <code>Place</code>, the original code recursed on <code>Place::Projection</code>, basically the idea is to get rid of the recursion and use your new <code>iterate</code> method</p>



<a name="163645242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163645242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163645242">(Apr 18 2019 at 12:14)</a>:</h4>
<p>r=me on the PR or if you want you can already experiment with porting the <code>Debug</code> impl in the same PR, but I'm fine with it either way</p>



<a name="163647973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163647973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163647973">(Apr 18 2019 at 12:51)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> I guess is better if you merge that</p>



<a name="163647980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163647980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163647980">(Apr 18 2019 at 12:51)</a>:</h4>
<p>so I can rebase the other branch on top</p>



<a name="163647985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163647985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163647985">(Apr 18 2019 at 12:51)</a>:</h4>
<p>and do that in the next PR</p>



<a name="163648063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163648063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163648063">(Apr 18 2019 at 12:52)</a>:</h4>
<p>the best thing of that is meanwhile I'm on vacations that is going to land</p>



<a name="163648077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163648077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163648077">(Apr 18 2019 at 12:52)</a>:</h4>
<p>unsure what do you mean by <code>r=me</code></p>



<a name="163648079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163648079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163648079">(Apr 18 2019 at 12:52)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/60063" target="_blank" title="https://github.com/rust-lang/rust/pull/60063">https://github.com/rust-lang/rust/pull/60063</a></p>



<a name="163648086"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163648086" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163648086">(Apr 18 2019 at 12:52)</a>:</h4>
<p>isn't what I did enough?</p>



<a name="163720455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163720455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163720455">(Apr 19 2019 at 07:54)</a>:</h4>
<blockquote>
<p>unsure what do you mean by <code>r=me</code></p>
</blockquote>
<p>That's bors-speak for anyone with bors powers may write <code>@bors r=oli-obk</code> so the PR gets merged but is marked as approved by me</p>



<a name="163728507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/163728507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#163728507">(Apr 19 2019 at 11:08)</a>:</h4>
<p>ahh yeah I don’t have bors rights, <span class="user-mention" data-user-id="116009">@nikomatsakis</span> told me that I should have 😊</p>



<a name="164055186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164055186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Saleem Jaffer <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164055186">(Apr 24 2019 at 05:29)</a>:</h4>
<p>(deleted)</p>



<a name="164144157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164144157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164144157">(Apr 25 2019 at 05:13)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> you were planning to implement Debug for Place using iterate if I'm correct</p>



<a name="164144159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164144159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164144159">(Apr 25 2019 at 05:13)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/master/src/librustc/mir/mod.rs#L2157-L2215" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc/mir/mod.rs#L2157-L2215">https://github.com/rust-lang/rust/blob/master/src/librustc/mir/mod.rs#L2157-L2215</a></p>



<a name="164144162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164144162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164144162">(Apr 25 2019 at 05:13)</a>:</h4>
<p>how were you planning to do so?</p>



<a name="164144214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164144214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164144214">(Apr 25 2019 at 05:14)</a>:</h4>
<p>quickly looking at the code the only way I can think of is using a Stack</p>



<a name="164144370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164144370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164144370">(Apr 25 2019 at 05:18)</a>:</h4>
<p>because for each projection I need to print a starting part, then continue to the next projection and then when I'm back I print the last part</p>



<a name="164144402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164144402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164144402">(Apr 25 2019 at 05:19)</a>:</h4>
<p>or I guess I could iterate forward, print the opening part, go to base print it and iterate again in reverse to print the closing parts</p>



<a name="164165502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164165502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164165502">(Apr 25 2019 at 12:29)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> you there?</p>



<a name="164165506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164165506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164165506">(Apr 25 2019 at 12:29)</a>:</h4>
<p>jup</p>



<a name="164165540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164165540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164165540">(Apr 25 2019 at 12:30)</a>:</h4>
<p>can you explain why this <a href="https://github.com/rust-lang/rust/pull/60247/files#r278458354" target="_blank" title="https://github.com/rust-lang/rust/pull/60247/files#r278458354">https://github.com/rust-lang/rust/pull/60247/files#r278458354</a> ?</p>



<a name="164165582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164165582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164165582">(Apr 25 2019 at 12:30)</a>:</h4>
<p>first thing</p>



<a name="164165585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164165585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164165585">(Apr 25 2019 at 12:30)</a>:</h4>
<p>for instance for a.b.c</p>



<a name="164165594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164165594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164165594">(Apr 25 2019 at 12:30)</a>:</h4>
<p>old repr was .c -&gt; .b -&gt; .a</p>



<a name="164165607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164165607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164165607">(Apr 25 2019 at 12:30)</a>:</h4>
<p>isn't the new one the same?</p>



<a name="164165703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164165703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164165703">(Apr 25 2019 at 12:32)</a>:</h4>
<p>the new one is <code>(a, .c -&gt; .b -&gt; None)</code>, but the iterator specifically exists to iterate in "reverse" order (reverse when lookng at the recursive datastructure). so iterating you kinda get <code>(a, [.b, .c])</code> (assuming the slice in here is an iterator)</p>



<a name="164166408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166408">(Apr 25 2019 at 12:44)</a>:</h4>
<p>yeah, so by doing iterating directly, then going to base and then iterating backwards I'm doing .c -&gt; .b -&gt; .a -&gt; .b -&gt; .c</p>



<a name="164166414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166414">(Apr 25 2019 at 12:44)</a>:</h4>
<p>isn't that an exact replica of the recursion?</p>



<a name="164166462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166462">(Apr 25 2019 at 12:45)</a>:</h4>
<p>yes, but we're trying to replicate the output here in a way that once the recursive datastructure is gone, will require minimal changes</p>



<a name="164166537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166537">(Apr 25 2019 at 12:46)</a>:</h4>
<p>Basically your PR that turns <code>Place</code> into a <code>struct</code> should not have to touch the <code>Debug</code> impl after this change</p>



<a name="164166566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166566">(Apr 25 2019 at 12:46)</a>:</h4>
<p>oh I misunderstdood your question</p>



<a name="164166578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166578">(Apr 25 2019 at 12:46)</a>:</h4>
<p>ahh sorry, I think the iterator gives you .b -&gt; .c</p>



<a name="164166583"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166583" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166583">(Apr 25 2019 at 12:46)</a>:</h4>
<p>not .c -&gt; .b</p>



<a name="164166586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166586">(Apr 25 2019 at 12:47)</a>:</h4>
<p>right?</p>



<a name="164166605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166605">(Apr 25 2019 at 12:47)</a>:</h4>
<p>yes, that's what I was failing to explain</p>



<a name="164166610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166610">(Apr 25 2019 at 12:47)</a>:</h4>
<p>I'm not looking at the code and didn't look at the playing by memory</p>



<a name="164166613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166613">(Apr 25 2019 at 12:47)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="164166620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166620">(Apr 25 2019 at 12:47)</a>:</h4>
<p>just force pushed</p>



<a name="164166729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166729">(Apr 25 2019 at 12:48)</a>:</h4>
<p>jup, that looks right to me now</p>



<a name="164166730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166730">(Apr 25 2019 at 12:48)</a>:</h4>
<p>as soon as the ci is happy is ready to merge then</p>



<a name="164166945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166945">(Apr 25 2019 at 12:51)</a>:</h4>
<p>yesterday after a some days off this work come back to it and rebased on top of the iterate changes</p>



<a name="164166964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166964">(Apr 25 2019 at 12:51)</a>:</h4>
<p>now did this and going to sit the WIP thing we have been talking about on top of also this PR</p>



<a name="164166968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164166968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164166968">(Apr 25 2019 at 12:51)</a>:</h4>
<p>so I can continue with the rest</p>



<a name="164167297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164167297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164167297">(Apr 25 2019 at 12:56)</a>:</h4>
<p>It's so cool that you're doing all this work. I hope to soonish have more time, so that mir-opt actually starts deserving the term working <strong>group</strong></p>



<a name="164167455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164167455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164167455">(Apr 25 2019 at 12:58)</a>:</h4>
<p>:)</p>



<a name="164167476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164167476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164167476">(Apr 25 2019 at 12:59)</a>:</h4>
<p>I wish I can finish this quickly so I can involve in other things too</p>



<a name="164176524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164176524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164176524">(Apr 25 2019 at 14:44)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <a href="https://github.com/rust-lang/rust/pull/60247" target="_blank" title="https://github.com/rust-lang/rust/pull/60247">https://github.com/rust-lang/rust/pull/60247</a> ready to r+ :)</p>



<a name="164465898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164465898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164465898">(Apr 29 2019 at 16:22)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> I've rebased the struct thing a while ago</p>



<a name="164465903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164465903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164465903">(Apr 29 2019 at 16:22)</a>:</h4>
<p>squashed everything</p>



<a name="164465907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164465907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164465907">(Apr 29 2019 at 16:22)</a>:</h4>
<p>and continued the work going</p>



<a name="164465923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164465923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164465923">(Apr 29 2019 at 16:22)</a>:</h4>
<p>I'm not sure if I should keep going and provide a huge commit or do you want to keep seeing this WIP X commits</p>



<a name="164465952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164465952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164465952">(Apr 29 2019 at 16:23)</a>:</h4>
<p>anyway right now everything is amended with more stuff but I can do a <code>WIP 1</code> thing and keep that going until this compiles</p>



<a name="164474799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164474799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164474799">(Apr 29 2019 at 18:10)</a>:</h4>
<p>I'm fine with you squashing it</p>



<a name="164475101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475101">(Apr 29 2019 at 18:14)</a>:</h4>
<p>ok</p>



<a name="164475115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475115">(Apr 29 2019 at 18:14)</a>:</h4>
<p>man it's a lot of work</p>



<a name="164475121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475121">(Apr 29 2019 at 18:14)</a>:</h4>
<p>I mean, it's easy but it's a lot of stuff :P</p>



<a name="164475127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475127">(Apr 29 2019 at 18:14)</a>:</h4>
<p>I'm right now seeing 322 errors</p>



<a name="164475134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475134">(Apr 29 2019 at 18:14)</a>:</h4>
<p>changes are not that mechanical really</p>



<a name="164475160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475160">(Apr 29 2019 at 18:15)</a>:</h4>
<p>maybe we can set a checkpoint at some given time so you can do a review</p>



<a name="164475192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475192">(Apr 29 2019 at 18:15)</a>:</h4>
<p>I'm afraid of spending a huge amount of hours doing something that is not exactly what you imagined</p>



<a name="164475195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475195">(Apr 29 2019 at 18:15)</a>:</h4>
<p>I'm sitting on a train right now</p>



<a name="164475199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475199">(Apr 29 2019 at 18:15)</a>:</h4>
<p>throw stuff at me</p>



<a name="164475202"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475202" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475202">(Apr 29 2019 at 18:15)</a>:</h4>
<p>ok</p>



<a name="164475212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475212">(Apr 29 2019 at 18:15)</a>:</h4>
<p>can push what I have now</p>



<a name="164475217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475217">(Apr 29 2019 at 18:15)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="164475227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475227">(Apr 29 2019 at 18:16)</a>:</h4>
<p>I think there were already some pending comments on your side</p>



<a name="164475284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475284">(Apr 29 2019 at 18:16)</a>:</h4>
<p>have those written down</p>



<a name="164475322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475322">(Apr 29 2019 at 18:16)</a>:</h4>
<p><a href="https://github.com/spastorino/rust/commit/8b96364a4caf4280c3ab02d539644d557a4ba748" target="_blank" title="https://github.com/spastorino/rust/commit/8b96364a4caf4280c3ab02d539644d557a4ba748">https://github.com/spastorino/rust/commit/8b96364a4caf4280c3ab02d539644d557a4ba748</a></p>



<a name="164475340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475340">(Apr 29 2019 at 18:17)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> ^^^, a couple of comments before you doing a review :)</p>



<a name="164475359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475359">(Apr 29 2019 at 18:17)</a>:</h4>
<p>there's Place::ty_from, I've added that but didn't make all the code use that</p>



<a name="164475369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475369">(Apr 29 2019 at 18:17)</a>:</h4>
<p>I'd need to remove the repetitions and replace with a call to this</p>



<a name="164475398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475398">(Apr 29 2019 at 18:17)</a>:</h4>
<p>and there's also a lot of <code>&amp;Place { }</code> I was going to add a FIXME before each of those but didn't do that yet neither</p>



<a name="164475457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475457">(Apr 29 2019 at 18:18)</a>:</h4>
<p>I'm not even sure if doing that is possible or a good idea yet</p>



<a name="164475461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475461">(Apr 29 2019 at 18:18)</a>:</h4>
<p>will see</p>



<a name="164475486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475486">(Apr 29 2019 at 18:18)</a>:</h4>
<p>I fear I may end in a lot of used of moved value errors</p>



<a name="164475492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475492">(Apr 29 2019 at 18:18)</a>:</h4>
<p>I may need to clone things that are inside</p>



<a name="164475517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475517">(Apr 29 2019 at 18:18)</a>:</h4>
<p>can you elaborate on the clone thing?</p>



<a name="164475518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475518">(Apr 29 2019 at 18:18)</a>:</h4>
<p>anyway, it's a temporary hack to avoid changing all the signatures of the functions I'm calling</p>



<a name="164475539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475539">(Apr 29 2019 at 18:19)</a>:</h4>
<p>temporary as in will be gone by the end of the PR?</p>



<a name="164475545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475545">(Apr 29 2019 at 18:19)</a>:</h4>
<p>yes</p>



<a name="164475553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475553">(Apr 29 2019 at 18:19)</a>:</h4>
<p>I want to have something as minimal as possible compiling</p>



<a name="164475558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475558">(Apr 29 2019 at 18:19)</a>:</h4>
<p>ah, ok, that's fine then</p>



<a name="164475560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475560">(Apr 29 2019 at 18:19)</a>:</h4>
<p>so I can run tests and be sure</p>



<a name="164475582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475582">(Apr 29 2019 at 18:19)</a>:</h4>
<p>changing all the functions signatures to receive base and projection instead of place would be a lot of work I think</p>



<a name="164475643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475643">(Apr 29 2019 at 18:20)</a>:</h4>
<p>so more changes all over the place that may introduce changes</p>



<a name="164475701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475701">(Apr 29 2019 at 18:21)</a>:</h4>
<p>right</p>



<a name="164475735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475735">(Apr 29 2019 at 18:21)</a>:</h4>
<p>so at first you're just creating a new <code>Place</code>?</p>



<a name="164475902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475902">(Apr 29 2019 at 18:23)</a>:</h4>
<p>unsure what do you meant</p>



<a name="164475986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475986">(Apr 29 2019 at 18:24)</a>:</h4>
<p>if you're talking about those cases, yeah, I'm creating a new place out of a <code>PlaceBase</code> and a <code>PlaceProjection</code></p>



<a name="164475997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164475997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164475997">(Apr 29 2019 at 18:24)</a>:</h4>
<p>you clone <code>Place</code>s, modify the projection and then call the appropriate method, compared to what used to be just fetching the inner projection's place?</p>



<a name="164476003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476003">(Apr 29 2019 at 18:24)</a>:</h4>
<p>gotcha</p>



<a name="164476004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476004">(Apr 29 2019 at 18:24)</a>:</h4>
<p>do you think it would be less work to make <code>Place</code> generic and use a <code>Place&lt;Box&lt;Projection&gt;&gt;</code> vs a <code>Place&lt;&amp;Projection&gt;</code> depending on the use case?</p>



<a name="164476056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476056">(Apr 29 2019 at 18:25)</a>:</h4>
<p>the generic parameter could still default to <code>Place&lt;Box&lt;Projection&gt;&gt;</code> so most code doesn't have to be changed</p>



<a name="164476095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476095">(Apr 29 2019 at 18:26)</a>:</h4>
<p>sorry but I'm having a hard time following you :P</p>



<a name="164476138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476138">(Apr 29 2019 at 18:26)</a>:</h4>
<blockquote>
<p>you clone <code>Place</code>s, modify the projection and then call the appropriate method, compared to what used to be just fetching the inner projection's place?</p>
</blockquote>
<p>unsure what do you meant :)</p>



<a name="164476148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476148">(Apr 29 2019 at 18:26)</a>:</h4>
<blockquote>
<p>do you think it would be less work to make <code>Place</code> generic and use a <code>Place&lt;Box&lt;Projection&gt;&gt;</code> vs a <code>Place&lt;&amp;Projection&gt;</code> depending on the use case?</p>
</blockquote>
<p>unsure either</p>



<a name="164476215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476215">(Apr 29 2019 at 18:27)</a>:</h4>
<p>so when the old code was recursing on a <code>&amp;Place</code>, that was easy. You match on the variant, if it's a <code>Projection</code>, you get the inner <code>Place</code> and recurse</p>



<a name="164476241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476241">(Apr 29 2019 at 18:27)</a>:</h4>
<p>yes</p>



<a name="164476267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476267">(Apr 29 2019 at 18:27)</a>:</h4>
<p>now, when you recurse, what you do is you fetch the <code>projection</code> field, match on that, build a new <code>Place</code> with the inner projection and the original base</p>



<a name="164476319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476319">(Apr 29 2019 at 18:28)</a>:</h4>
<p>yes</p>



<a name="164476324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476324">(Apr 29 2019 at 18:28)</a>:</h4>
<p>this requires cloning the <code>Box&lt;Projection&gt;</code>, because you only have borrowed access</p>



<a name="164476333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476333">(Apr 29 2019 at 18:28)</a>:</h4>
<p>yes</p>



<a name="164476549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476549">(Apr 29 2019 at 18:30)</a>:</h4>
<p>So instead of passing down the <code>base</code> and <code>projection</code> field separately, you could have a type almost like <code>Place</code>, but instead of the <code>projection</code> field being <code>Box&lt;Projection&gt;</code> it's <code>&amp;Projection</code></p>



<a name="164476606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476606">(Apr 29 2019 at 18:31)</a>:</h4>
<p>in order to reduce code duplication, we can make <code>Place</code> generic over the <code>projection</code> field's type and either use <code>Box&lt;Projection&gt;</code> or <code>&amp;Projection</code> depending on what the code does</p>



<a name="164476638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476638">(Apr 29 2019 at 18:31)</a>:</h4>
<p>ahh yes, I see what you meant</p>



<a name="164476652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476652">(Apr 29 2019 at 18:32)</a>:</h4>
<p>so my question to you is: do you think this would help or is that even more churn?</p>



<a name="164476720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476720">(Apr 29 2019 at 18:32)</a>:</h4>
<p>especially since we'll essentially be undoing it once we go to interned slices</p>



<a name="164476738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476738">(Apr 29 2019 at 18:32)</a>:</h4>
<p>yeah, I'm wondering about it</p>



<a name="164476740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476740">(Apr 29 2019 at 18:32)</a>:</h4>
<p>unsure</p>



<a name="164476785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476785">(Apr 29 2019 at 18:33)</a>:</h4>
<p>what do you think?</p>



<a name="164476791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476791">(Apr 29 2019 at 18:33)</a>:</h4>
<p>about the approach you have proposed</p>



<a name="164476793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476793">(Apr 29 2019 at 18:33)</a>:</h4>
<p>vs</p>



<a name="164476805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476805">(Apr 29 2019 at 18:33)</a>:</h4>
<p>just doing clone and keep passing Place</p>



<a name="164476828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476828">(Apr 29 2019 at 18:33)</a>:</h4>
<p>and then changing all the involved functions to receive both things</p>



<a name="164476888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476888">(Apr 29 2019 at 18:34)</a>:</h4>
<p>with your new approach you also want to avoid the functions receive both things?</p>



<a name="164476921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476921">(Apr 29 2019 at 18:34)</a>:</h4>
<p>well, they'll still change the type of the argument they take, but the rest of the code should stay mostly unaffected</p>



<a name="164476926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476926">(Apr 29 2019 at 18:34)</a>:</h4>
<p>but once we go to interned slices, wouldn't we also need to receive both things in most of the functions?</p>



<a name="164476943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476943">(Apr 29 2019 at 18:34)</a>:</h4>
<p>you could have a sort of <code>as_ref</code> method on <code>Place</code> that gives the "borrowed view"</p>



<a name="164476987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476987">(Apr 29 2019 at 18:35)</a>:</h4>
<p>but I don't need the borrowed view of an existing place</p>



<a name="164476992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164476992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164476992">(Apr 29 2019 at 18:35)</a>:</h4>
<p>well, yes, but if you have a <code>Place</code> you have both <code>PlaceBase</code> and <code>&amp;[Projection]</code> and you can cheaply create a new place because slices (and subslices) are <code>Copy</code></p>



<a name="164477001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477001">(Apr 29 2019 at 18:35)</a>:</h4>
<p>I need to strip the head projections and form a place from there</p>



<a name="164477054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477054">(Apr 29 2019 at 18:36)</a>:</h4>
<blockquote>
<p>well, yes, but if you have a <code>Place</code> you have both <code>PlaceBase</code> and <code>&amp;[Projection]</code> and you can cheaply create a new place because slices (and subslices) are <code>Copy</code></p>
</blockquote>
<p>true</p>



<a name="164477059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477059">(Apr 29 2019 at 18:36)</a>:</h4>
<p>which would just be <code>Place { base: old.base, proj: &amp;old.proj[1..] }</code></p>



<a name="164477066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477066">(Apr 29 2019 at 18:36)</a>:</h4>
<p>so better to avoid changing all the signatures</p>



<a name="164477072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477072">(Apr 29 2019 at 18:36)</a>:</h4>
<p>hmm well seems like your idea is better then</p>



<a name="164477081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477081">(Apr 29 2019 at 18:36)</a>:</h4>
<p>you'd still somewhat change the signatures</p>



<a name="164477087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477087">(Apr 29 2019 at 18:36)</a>:</h4>
<p>yes</p>



<a name="164477103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477103">(Apr 29 2019 at 18:37)</a>:</h4>
<p>but it's a minor change</p>



<a name="164477118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477118">(Apr 29 2019 at 18:37)</a>:</h4>
<p>since you need to use <code>Place&lt;'tcx, &amp;'a Projection&gt;</code> instead of <code>Place&lt;'tcx&gt;</code></p>



<a name="164477135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477135">(Apr 29 2019 at 18:37)</a>:</h4>
<p>yep, agree but that changes is easier and simpler than receiving two things</p>



<a name="164477198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477198">(Apr 29 2019 at 18:38)</a>:</h4>
<p>and impls could stay the same</p>



<a name="164477210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164477210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164477210">(Apr 29 2019 at 18:38)</a>:</h4>
<p>and in my case I need to adapt everything</p>



<a name="164482741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482741">(Apr 29 2019 at 19:48)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> I saw you left <a href="https://github.com/spastorino/rust/commit/8b96364a4caf4280c3ab02d539644d557a4ba748#r33350775" target="_blank" title="https://github.com/spastorino/rust/commit/8b96364a4caf4280c3ab02d539644d557a4ba748#r33350775">https://github.com/spastorino/rust/commit/8b96364a4caf4280c3ab02d539644d557a4ba748#r33350775</a></p>



<a name="164482754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482754">(Apr 29 2019 at 19:48)</a>:</h4>
<p>did you reviewed the thing completely?</p>



<a name="164482755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482755">(Apr 29 2019 at 19:48)</a>:</h4>
<p>that's the only comment? :)</p>



<a name="164482757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482757">(Apr 29 2019 at 19:48)</a>:</h4>
<p>yea, and immediately realized I wasn't sure if you wanted me to start reviewing and thus stopped</p>



<a name="164482770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482770">(Apr 29 2019 at 19:49)</a>:</h4>
<p>then I forgot to tell you about that</p>



<a name="164482780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482780">(Apr 29 2019 at 19:49)</a>:</h4>
<p>hehe</p>



<a name="164482791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482791">(Apr 29 2019 at 19:49)</a>:</h4>
<p>so about that comment in particular, is wrong :)</p>



<a name="164482799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482799">(Apr 29 2019 at 19:49)</a>:</h4>
<p>I guess you confused something?</p>



<a name="164482806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482806">(Apr 29 2019 at 19:49)</a>:</h4>
<p>guess you want *projection</p>



<a name="164482817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482817">(Apr 29 2019 at 19:49)</a>:</h4>
<p>but mainly you wanted me to remove the ref?</p>



<a name="164482821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482821">(Apr 29 2019 at 19:49)</a>:</h4>
<p>ah</p>



<a name="164482824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482824">(Apr 29 2019 at 19:49)</a>:</h4>
<p>also, about the review, please do so</p>



<a name="164482827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482827">(Apr 29 2019 at 19:49)</a>:</h4>
<p>no, just don't do anything to <code>projection</code></p>



<a name="164482882"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482882" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482882">(Apr 29 2019 at 19:50)</a>:</h4>
<p>if you match on a reference, you automatically get <code>ref</code> patterns</p>



<a name="164482895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482895">(Apr 29 2019 at 19:50)</a>:</h4>
<p>match ergonomics are cool like that</p>



<a name="164482900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482900">(Apr 29 2019 at 19:50)</a>:</h4>
<p>I just didn't realize you already had a reference</p>



<a name="164482921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482921">(Apr 29 2019 at 19:50)</a>:</h4>
<p>ahh yeah</p>



<a name="164482930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482930">(Apr 29 2019 at 19:50)</a>:</h4>
<p>I guess I need to check that RFC again</p>



<a name="164482934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164482934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164482934">(Apr 29 2019 at 19:51)</a>:</h4>
<p>I'm never sure when that happens</p>



<a name="164483020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164483020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164483020">(Apr 29 2019 at 19:52)</a>:</h4>
<p>maybe, let me push what I have now after this change and I guess you can review</p>



<a name="164483193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164483193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164483193">(Apr 29 2019 at 19:54)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <a href="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81" target="_blank" title="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81">https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81</a></p>



<a name="164483220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164483220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164483220">(Apr 29 2019 at 19:55)</a>:</h4>
<p>I guess what I'm going to do now is trying to do Place's Projection generic</p>



<a name="164484610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164484610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164484610">(Apr 29 2019 at 20:12)</a>:</h4>
<blockquote>
<p>the generic parameter could still default to <code>Place&lt;Box&lt;Projection&gt;&gt;</code> so most code doesn't have to be changed</p>
</blockquote>
<p>what do you mean by this?</p>



<a name="164484642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164484642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164484642">(Apr 29 2019 at 20:13)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> how can I make a generic parameter default to a specific type?</p>



<a name="164484659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164484659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164484659">(Apr 29 2019 at 20:13)</a>:</h4>
<p><code>struct Foo&lt;T = Bar&gt;</code></p>



<a name="164484662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164484662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164484662">(Apr 29 2019 at 20:13)</a>:</h4>
<p>might need feature gates (if not already on)</p>



<a name="164484670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164484670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164484670">(Apr 29 2019 at 20:13)</a>:</h4>
<p>ahh ok ok</p>



<a name="164487087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487087">(Apr 29 2019 at 20:44)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> you around?</p>



<a name="164487092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487092">(Apr 29 2019 at 20:44)</a>:</h4>
<p>about this <a href="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352321" target="_blank" title="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352321">https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352321</a></p>



<a name="164487099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487099">(Apr 29 2019 at 20:44)</a>:</h4>
<p>wouldn't we want to use iterate?</p>



<a name="164487124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487124">(Apr 29 2019 at 20:45)</a>:</h4>
<p>in particular I was debating in a lot of places how much to change the code in the first commit</p>



<a name="164487158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487158">(Apr 29 2019 at 20:45)</a>:</h4>
<p>or just make the minimal changes as a low risk of getting failures and then refactor the methods</p>



<a name="164487165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487165">(Apr 29 2019 at 20:45)</a>:</h4>
<p>but yeah I guess I can do everything at once :P</p>



<a name="164487222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487222">(Apr 29 2019 at 20:46)</a>:</h4>
<p>hmm... good point</p>



<a name="164487231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487231">(Apr 29 2019 at 20:46)</a>:</h4>
<p>about iterate?</p>



<a name="164487235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487235">(Apr 29 2019 at 20:46)</a>:</h4>
<p>about not changing too much</p>



<a name="164487237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487237">(Apr 29 2019 at 20:46)</a>:</h4>
<p>ahh  ya</p>



<a name="164487247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487247">(Apr 29 2019 at 20:46)</a>:</h4>
<p>that's why most of the code may look very bad :P</p>



<a name="164487251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487251">(Apr 29 2019 at 20:46)</a>:</h4>
<p>that's fine</p>



<a name="164487254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487254">(Apr 29 2019 at 20:47)</a>:</h4>
<p>you're right</p>



<a name="164487268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487268">(Apr 29 2019 at 20:47)</a>:</h4>
<p>it's much easier to review this way</p>



<a name="164487287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487287">(Apr 29 2019 at 20:47)</a>:</h4>
<p>I'll still leave the comments, but just keep them for addressing after everything works in the current way</p>



<a name="164487431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487431">(Apr 29 2019 at 20:49)</a>:</h4>
<p>I guess I should add a lot of FIXME SOMECODE and message</p>



<a name="164487433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487433">(Apr 29 2019 at 20:49)</a>:</h4>
<p>like</p>



<a name="164487456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487456">(Apr 29 2019 at 20:49)</a>:</h4>
<p><code>// FIXME PLACE2 Make this code use iterate</code></p>



<a name="164487462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487462">(Apr 29 2019 at 20:49)</a>:</h4>
<p>something like that</p>



<a name="164487533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487533">(Apr 29 2019 at 20:50)</a>:</h4>
<p>in particular, now I was thinking, should that code use <code>iterate</code>?</p>



<a name="164487653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487653">(Apr 29 2019 at 20:51)</a>:</h4>
<p>the problem is that iterate gives me the thing in the normal order but I need it in the reverse order</p>



<a name="164487668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487668">(Apr 29 2019 at 20:51)</a>:</h4>
<p>actually, most of the time I need the stuff in reverse order, right?</p>



<a name="164487700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164487700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164487700">(Apr 29 2019 at 20:52)</a>:</h4>
<p>I'm not sure why iterate is giving the thing in the straight order</p>



<a name="164488739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164488739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164488739">(Apr 29 2019 at 21:05)</a>:</h4>
<p>it's 50/50</p>



<a name="164488874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164488874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164488874">(Apr 29 2019 at 21:06)</a>:</h4>
<p>you can create a second <code>iterate_rev</code> function that iterates directly for the cases that iterate in the reverse order and implement these algorithms on top of that if you want, but as a first step using a <code>loop</code> should work out well enough</p>



<a name="164489048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489048">(Apr 29 2019 at 21:09)</a>:</h4>
<p>yeah, so with this current impl we can't make a DoubleEndedIterator we could when we use the sliced version</p>



<a name="164489063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489063">(Apr 29 2019 at 21:10)</a>:</h4>
<p>we need to have a complete separate implementation of the reverse iterator</p>



<a name="164489133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489133">(Apr 29 2019 at 21:10)</a>:</h4>
<p>yea</p>



<a name="164489138"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489138" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489138">(Apr 29 2019 at 21:10)</a>:</h4>
<p>btw: <a href="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352504" target="_blank" title="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352504">https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352504</a></p>



<a name="164489140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489140">(Apr 29 2019 at 21:10)</a>:</h4>
<p>unfortunate, but as you said, we can fix that in the future</p>



<a name="164489149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489149">(Apr 29 2019 at 21:11)</a>:</h4>
<p>what do you want me to do there?</p>



<a name="164489269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489269">(Apr 29 2019 at 21:12)</a>:</h4>
<p>ah ups, answered on the comment</p>



<a name="164489287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489287">(Apr 29 2019 at 21:12)</a>:</h4>
<p>I don't see how the methods are ever more concise than directly accessing the field</p>



<a name="164489452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489452">(Apr 29 2019 at 21:15)</a>:</h4>
<p>I also have some doubts about this <a href="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352803" target="_blank" title="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352803">https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352803</a></p>



<a name="164489534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489534">(Apr 29 2019 at 21:16)</a>:</h4>
<blockquote>
<p>I don't see how the methods are ever more concise than directly accessing the field</p>
</blockquote>
<p>I can't access the fields, unless we want to make them public</p>



<a name="164489539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489539">(Apr 29 2019 at 21:16)</a>:</h4>
<p>which may make sense :)</p>



<a name="164489591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489591">(Apr 29 2019 at 21:17)</a>:</h4>
<p>oh lol</p>



<a name="164489593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489593">(Apr 29 2019 at 21:17)</a>:</h4>
<p>I did not see that</p>



<a name="164489598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489598">(Apr 29 2019 at 21:17)</a>:</h4>
<p>and about this <a href="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352803" target="_blank" title="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352803">https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352803</a></p>



<a name="164489601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489601">(Apr 29 2019 at 21:17)</a>:</h4>
<p>yea, just make them public, the enum variants were public, too</p>



<a name="164489606"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489606" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489606">(Apr 29 2019 at 21:17)</a>:</h4>
<p>yes</p>



<a name="164489610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489610">(Apr 29 2019 at 21:17)</a>:</h4>
<p>agreed</p>



<a name="164489614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489614">(Apr 29 2019 at 21:17)</a>:</h4>
<p>about this <a href="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352803" target="_blank" title="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352803">https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352803</a></p>



<a name="164489620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489620">(Apr 29 2019 at 21:17)</a>:</h4>
<p>it's wrong yeah</p>



<a name="164489628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489628">(Apr 29 2019 at 21:17)</a>:</h4>
<p>we want projection be none and base be local</p>



<a name="164489636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489636">(Apr 29 2019 at 21:17)</a>:</h4>
<p>that's not equivalent</p>



<a name="164489723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489723">(Apr 29 2019 at 21:18)</a>:</h4>
<p>seems like an easy footgun, maybe just remove the method in favour of a method on <code>PlaceBase</code>?</p>



<a name="164489724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489724">(Apr 29 2019 at 21:18)</a>:</h4>
<p>the <code>local</code> function is "similar" but it considers Deref too</p>



<a name="164489745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489745">(Apr 29 2019 at 21:19)</a>:</h4>
<p>yea, but that one was preexisting, right?</p>



<a name="164489759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489759">(Apr 29 2019 at 21:19)</a>:</h4>
<p>yes</p>



<a name="164489761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489761">(Apr 29 2019 at 21:19)</a>:</h4>
<p>and yes</p>



<a name="164489767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489767">(Apr 29 2019 at 21:19)</a>:</h4>
<p>place.base.local()</p>



<a name="164489768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489768">(Apr 29 2019 at 21:19)</a>:</h4>
<p>seems better</p>



<a name="164489983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489983">(Apr 29 2019 at 21:22)</a>:</h4>
<p>so I'm done with my review pass</p>



<a name="164489989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164489989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164489989">(Apr 29 2019 at 21:22)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="164490002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164490002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164490002">(Apr 29 2019 at 21:22)</a>:</h4>
<p>I'm probably going to stop for today</p>



<a name="164490022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164490022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164490022">(Apr 29 2019 at 21:22)</a>:</h4>
<p>next steps I'm going to fix your comments and migrate to a generic Place</p>



<a name="164490053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164490053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164490053">(Apr 29 2019 at 21:23)</a>:</h4>
<p>then keep fixing errors</p>



<a name="164490070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164490070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164490070">(Apr 29 2019 at 21:23)</a>:</h4>
<p>when I see the amount of errors to fix I want cry :P</p>



<a name="164490660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164490660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164490660">(Apr 29 2019 at 21:31)</a>:</h4>
<p>I feel you. The fallout from touching omnipresent datatypes like that is insane</p>



<a name="164491077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164491077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164491077">(Apr 29 2019 at 21:37)</a>:</h4>
<p>hehe, no worries :)</p>



<a name="164542864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164542864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164542864">(Apr 30 2019 at 14:21)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> back to this</p>



<a name="164542868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164542868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164542868">(Apr 30 2019 at 14:21)</a>:</h4>
<p>about your comment here <a href="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352380" target="_blank" title="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352380">https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352380</a></p>



<a name="164542871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164542871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164542871">(Apr 30 2019 at 14:21)</a>:</h4>
<p><span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span></p>



<a name="164542948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164542948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164542948">(Apr 30 2019 at 14:22)</a>:</h4>
<p>we are using base to return <code>StorageDeadOrDrop::LocalStorageDead</code></p>



<a name="164542979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164542979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164542979">(Apr 30 2019 at 14:22)</a>:</h4>
<p>but you don't care which base</p>



<a name="164542988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164542988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164542988">(Apr 30 2019 at 14:22)</a>:</h4>
<p>you just want to use if let else?</p>



<a name="164542990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164542990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164542990">(Apr 30 2019 at 14:22)</a>:</h4>
<p>this is just the <code>projections: None</code> case</p>



<a name="164542991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164542991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164542991">(Apr 30 2019 at 14:22)</a>:</h4>
<p>is that what you meant?</p>



<a name="164543037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543037">(Apr 30 2019 at 14:23)</a>:</h4>
<p>no, literally just do <code>match place.projection</code></p>



<a name="164543199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543199">(Apr 30 2019 at 14:25)</a>:</h4>
<p>if you look at the patterns, the <code>base</code> field is pretty much ignored (there's an exhaustive match for a single arm)</p>



<a name="164543215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543215">(Apr 30 2019 at 14:25)</a>:</h4>
<p>this is a preexisting issue, just amplified by your change</p>



<a name="164543373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543373">(Apr 30 2019 at 14:27)</a>:</h4>
<p>yeah ok</p>



<a name="164543394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543394">(Apr 30 2019 at 14:27)</a>:</h4>
<p>I was doing an if let Some(...) = place.projection {} else {}</p>



<a name="164543397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543397">(Apr 30 2019 at 14:27)</a>:</h4>
<p>but match is better :)</p>



<a name="164543507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543507">(Apr 30 2019 at 14:29)</a>:</h4>
<p>ah, that's what you meant. yea either is fine, but match has less churn since you don't need to swap the arms</p>



<a name="164543514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543514">(Apr 30 2019 at 14:29)</a>:</h4>
<p>yep <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="164543651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543651">(Apr 30 2019 at 14:31)</a>:</h4>
<p>as you have probably seen I've been putting zero attention to the implementation of things</p>



<a name="164543659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543659">(Apr 30 2019 at 14:31)</a>:</h4>
<p>was more into make the minimal changes to make this compile and work</p>



<a name="164543667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543667">(Apr 30 2019 at 14:31)</a>:</h4>
<p>planned another pass over to refactor</p>



<a name="164543673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543673">(Apr 30 2019 at 14:31)</a>:</h4>
<p>but anyway, both ways work :)</p>



<a name="164543748"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164543748" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164543748">(Apr 30 2019 at 14:32)</a>:</h4>
<p>just using the opportunity given that you gave some feedback to improve things in this same commit :)</p>



<a name="164545439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164545439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164545439">(Apr 30 2019 at 14:52)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> about <a href="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352587" target="_blank" title="https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352587">https://github.com/spastorino/rust/commit/1a0142ca44944d6b624bc1bd9908304f34ce2f81#r33352587</a></p>



<a name="164545490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164545490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164545490">(Apr 30 2019 at 14:52)</a>:</h4>
<p>most of the changes are related to indentation</p>



<a name="164545507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164545507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164545507">(Apr 30 2019 at 14:52)</a>:</h4>
<p>anyway, I think your changes look better</p>



<a name="164545585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164545585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164545585">(Apr 30 2019 at 14:53)</a>:</h4>
<p>probably better to do a while let</p>



<a name="164547837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164547837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164547837">(Apr 30 2019 at 15:19)</a>:</h4>
<p>yea, I should have probably made github ignore whitespace</p>



<a name="164745277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164745277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164745277">(May 02 2019 at 21:04)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> opened a very simple PR <a href="https://github.com/rust-lang/rust/pull/60486" target="_blank" title="https://github.com/rust-lang/rust/pull/60486">https://github.com/rust-lang/rust/pull/60486</a> with things that I've found along the way and had on my place 2.0 branch</p>



<a name="164745291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164745291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164745291">(May 02 2019 at 21:04)</a>:</h4>
<p>but I think it's easier if we just merge that stuff using a separate PR</p>



<a name="164776926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/164776926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#164776926">(May 03 2019 at 08:34)</a>:</h4>
<p>good idea, easier to merge, easier to review and less likely to miss something during review :D</p>



<a name="165085537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165085537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165085537">(May 07 2019 at 16:09)</a>:</h4>
<p>(deleted)</p>



<a name="165085626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165085626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165085626">(May 07 2019 at 16:10)</a>:</h4>
<p>(deleted)</p>



<a name="165085647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165085647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165085647">(May 07 2019 at 16:10)</a>:</h4>
<p>(deleted)</p>



<a name="165085670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165085670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165085670">(May 07 2019 at 16:10)</a>:</h4>
<p>(deleted)</p>



<a name="165086641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165086641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165086641">(May 07 2019 at 16:20)</a>:</h4>
<p>nevermind, what I was thinking is wrong</p>



<a name="165180967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165180967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165180967">(May 08 2019 at 17:04)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> you around?</p>



<a name="165180989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165180989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165180989">(May 08 2019 at 17:04)</a>:</h4>
<p>I've reached a point where may be nice to review something</p>



<a name="165181152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165181152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165181152">(May 08 2019 at 17:06)</a>:</h4>
<p>librustc_mir is compiling modulo some move out of borrowed content due to the silly <code>Place</code> temp, I've created, probably gonna go over what we talked about before of making <code>PlaceProjection</code> generic</p>



<a name="165189738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165189738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165189738">(May 08 2019 at 18:48)</a>:</h4>
<p>I won't have time today, but send me a link and I'll look at it tomorrow</p>



<a name="165366429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165366429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165366429">(May 10 2019 at 20:01)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> you around by any chance?</p>



<a name="165407548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165407548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165407548">(May 11 2019 at 11:36)</a>:</h4>
<p>am now</p>



<a name="165407550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165407550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165407550">(May 11 2019 at 11:36)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span></p>



<a name="165541757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541757">(May 13 2019 at 15:58)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> sorry I couldn't get to you</p>



<a name="165541769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541769">(May 13 2019 at 15:58)</a>:</h4>
<p>XD no worries</p>



<a name="165541785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541785">(May 13 2019 at 15:58)</a>:</h4>
<p>ended passing both place_base and place_projection everywhere</p>



<a name="165541797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541797">(May 13 2019 at 15:59)</a>:</h4>
<p>didn't go the generic way</p>



<a name="165541813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541813">(May 13 2019 at 15:59)</a>:</h4>
<p>well basically doing that now :)</p>



<a name="165541815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541815">(May 13 2019 at 15:59)</a>:</h4>
<p>passing both things</p>



<a name="165541831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541831">(May 13 2019 at 15:59)</a>:</h4>
<p>building a Place in place :) is not a good idea</p>



<a name="165541834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541834">(May 13 2019 at 15:59)</a>:</h4>
<p>yeaaa</p>



<a name="165541844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541844">(May 13 2019 at 15:59)</a>:</h4>
<p>but it's not a good idea even as an intermediate step :)</p>



<a name="165541853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541853">(May 13 2019 at 15:59)</a>:</h4>
<p>or well, may it is if I clone a lot of things</p>



<a name="165541855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541855">(May 13 2019 at 16:00)</a>:</h4>
<p>unsure</p>



<a name="165541918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541918">(May 13 2019 at 16:00)</a>:</h4>
<p>anyway, do you think that passing both things is ok?</p>



<a name="165541975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541975">(May 13 2019 at 16:00)</a>:</h4>
<p>it's ok, not ideal, but if we merge right after beta cutoff, we have 6 weeks to "fix it" :D</p>



<a name="165541996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165541996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165541996">(May 13 2019 at 16:00)</a>:</h4>
<p>hehe :)</p>



<a name="165542002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542002">(May 13 2019 at 16:01)</a>:</h4>
<p>what would be ideal for you?</p>



<a name="165542041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542041">(May 13 2019 at 16:01)</a>:</h4>
<p>I'm kind of in the middle of making progress and doing the right thing :)</p>



<a name="165542050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542050">(May 13 2019 at 16:01)</a>:</h4>
<p>of course the right thing is going to be the last picture of the work</p>



<a name="165542075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542075">(May 13 2019 at 16:01)</a>:</h4>
<p>no I mean, there is no ideal solution for this intermediate situation</p>



<a name="165542122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542122">(May 13 2019 at 16:02)</a>:</h4>
<p>ahh ya</p>



<a name="165542125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542125">(May 13 2019 at 16:02)</a>:</h4>
<p>ok</p>



<a name="165542158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542158">(May 13 2019 at 16:02)</a>:</h4>
<p>I'd say, I'm going to change to receive both things and we can review the PR</p>



<a name="165542173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542173">(May 13 2019 at 16:02)</a>:</h4>
<p>and discuss from there</p>



<a name="165542177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542177">(May 13 2019 at 16:02)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="165542558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542558">(May 13 2019 at 16:07)</a>:</h4>
<p>one question btw</p>



<a name="165542572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542572">(May 13 2019 at 16:07)</a>:</h4>
<p>for instance <code>prefixes</code></p>



<a name="165542594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542594">(May 13 2019 at 16:07)</a>:</h4>
<p>which gives back an interator over <code>Place</code></p>



<a name="165542617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542617">(May 13 2019 at 16:07)</a>:</h4>
<p>I wonder what to do exactly with this new setup</p>



<a name="165542689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542689">(May 13 2019 at 16:08)</a>:</h4>
<p>do you have a link?</p>



<a name="165542690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542690">(May 13 2019 at 16:08)</a>:</h4>
<p>if I go over PlaceProjection I'm going to miss the base</p>



<a name="165542749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542749">(May 13 2019 at 16:09)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/0a71d47f464cd59907cfdd69c570d3cd693404a8/src/librustc_mir/borrow_check/prefixes.rs" target="_blank" title="https://github.com/rust-lang/rust/blob/0a71d47f464cd59907cfdd69c570d3cd693404a8/src/librustc_mir/borrow_check/prefixes.rs">https://github.com/rust-lang/rust/blob/0a71d47f464cd59907cfdd69c570d3cd693404a8/src/librustc_mir/borrow_check/prefixes.rs</a></p>



<a name="165542773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165542773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165542773">(May 13 2019 at 16:09)</a>:</h4>
<p>but talking in general about that situation not about my code in particular because I haven't changed that yet :)</p>



<a name="165543029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543029">(May 13 2019 at 16:12)</a>:</h4>
<p>I guess in the cases where some code like this one wants to get projections and base I could use trait objects or something like that</p>



<a name="165543034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543034">(May 13 2019 at 16:12)</a>:</h4>
<p>but unsure what you had in mind</p>



<a name="165543448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543448">(May 13 2019 at 16:17)</a>:</h4>
<p>hmm... looks like you can use the same trick with a base field and a projection field?</p>



<a name="165543538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543538">(May 13 2019 at 16:18)</a>:</h4>
<p>unsure what you meant</p>



<a name="165543551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543551">(May 13 2019 at 16:18)</a>:</h4>
<p>I'm mainly talking about what I'm going to iterate over</p>



<a name="165543570"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543570" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543570">(May 13 2019 at 16:18)</a>:</h4>
<p>next will return Option&lt;?&gt;</p>



<a name="165543581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543581">(May 13 2019 at 16:18)</a>:</h4>
<p>Ah</p>



<a name="165543616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543616">(May 13 2019 at 16:19)</a>:</h4>
<p>hmm... just use a tuple over <code>PlaceBase</code> and <code>PlaceProjection</code> I guess?</p>



<a name="165543645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543645">(May 13 2019 at 16:19)</a>:</h4>
<p>(reference to PlaceProjection?)</p>



<a name="165543648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543648">(May 13 2019 at 16:19)</a>:</h4>
<p>yes that works, seems bad to me :P</p>



<a name="165543703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543703">(May 13 2019 at 16:20)</a>:</h4>
<p>or... just <code>&amp;PlaceProjection</code>?</p>



<a name="165543721"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543721" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543721">(May 13 2019 at 16:20)</a>:</h4>
<p>the user can fetch the base from the original place</p>



<a name="165543749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543749">(May 13 2019 at 16:20)</a>:</h4>
<p>yes</p>



<a name="165543752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543752">(May 13 2019 at 16:20)</a>:</h4>
<p>that's always possible</p>



<a name="165543759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543759">(May 13 2019 at 16:20)</a>:</h4>
<p>unsure what are the uses exactly of prefixes</p>



<a name="165543767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543767">(May 13 2019 at 16:21)</a>:</h4>
<p>idk :D</p>



<a name="165543788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543788">(May 13 2019 at 16:21)</a>:</h4>
<p>will try to go over placeprojection only then :)</p>



<a name="165543797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543797">(May 13 2019 at 16:21)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/0a71d47f464cd59907cfdd69c570d3cd693404a8/src/librustc_mir/borrow_check/prefixes.rs#L62" target="_blank" title="https://github.com/rust-lang/rust/blob/0a71d47f464cd59907cfdd69c570d3cd693404a8/src/librustc_mir/borrow_check/prefixes.rs#L62">https://github.com/rust-lang/rust/blob/0a71d47f464cd59907cfdd69c570d3cd693404a8/src/librustc_mir/borrow_check/prefixes.rs#L62</a> could even take just an <code>&amp;Option&lt;PlaceProjection&gt;</code> instead of a <code>&amp;Place</code></p>



<a name="165543868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543868">(May 13 2019 at 16:22)</a>:</h4>
<p>or whatever the exact type of the projection field is nowadays ^^</p>



<a name="165543875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165543875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165543875">(May 13 2019 at 16:22)</a>:</h4>
<p>All of these options and boxes are slightly confusing</p>



<a name="165546290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/165546290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#165546290">(May 13 2019 at 16:51)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="166222247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166222247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166222247">(May 21 2019 at 23:18)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> from our private chat <a href="https://github.com/rust-lang/rust/pull/61023" target="_blank" title="https://github.com/rust-lang/rust/pull/61023">https://github.com/rust-lang/rust/pull/61023</a></p>



<a name="166222543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166222543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166222543">(May 21 2019 at 23:23)</a>:</h4>
<p>for the record</p>



<a name="166222609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166222609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166222609">(May 21 2019 at 23:24)</a>:</h4>
<p>gonna keep sending this kind of PRs to move to iterate over recursion so the general PR <a href="https://github.com/rust-lang/rust/pull/60913" target="_blank" title="https://github.com/rust-lang/rust/pull/60913">https://github.com/rust-lang/rust/pull/60913</a> it's a bit easier to merge and work with</p>



<a name="166234858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166234858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166234858">(May 22 2019 at 03:56)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> also <a href="https://github.com/rust-lang/rust/pull/61030" target="_blank" title="https://github.com/rust-lang/rust/pull/61030">https://github.com/rust-lang/rust/pull/61030</a></p>



<a name="166260153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166260153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166260153">(May 22 2019 at 11:50)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> you around?</p>



<a name="166260158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166260158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166260158">(May 22 2019 at 11:50)</a>:</h4>
<p>about <a href="https://github.com/rust-lang/rust/pull/61030/files#r286370409" target="_blank" title="https://github.com/rust-lang/rust/pull/61030/files#r286370409">https://github.com/rust-lang/rust/pull/61030/files#r286370409</a></p>



<a name="166260216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166260216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166260216">(May 22 2019 at 11:51)</a>:</h4>
<p>to get rid of the continue I need to return None there but also add an else return None here <a href="https://github.com/rust-lang/rust/pull/61030/files#diff-7419efc1fe3c0f6f5e4231405f7c409eR403" target="_blank" title="https://github.com/rust-lang/rust/pull/61030/files#diff-7419efc1fe3c0f6f5e4231405f7c409eR403">https://github.com/rust-lang/rust/pull/61030/files#diff-7419efc1fe3c0f6f5e4231405f7c409eR403</a></p>



<a name="166260223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166260223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166260223">(May 22 2019 at 11:51)</a>:</h4>
<p>maybe that's better anyway</p>



<a name="166260945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166260945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166260945">(May 22 2019 at 12:03)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> have changed it and force pushed <a href="https://github.com/rust-lang/rust/pull/61030" target="_blank" title="https://github.com/rust-lang/rust/pull/61030">https://github.com/rust-lang/rust/pull/61030</a></p>



<a name="166261019"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166261019" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166261019">(May 22 2019 at 12:04)</a>:</h4>
<p>I don't understand why I'm getting <code>error value assigned to 'o' is never read</code></p>



<a name="166261716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166261716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166261716">(May 22 2019 at 12:16)</a>:</h4>
<p>there's a tiny error on what I did, still the <code>error value assigned to o</code> thing unsure</p>



<a name="166261753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166261753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166261753">(May 22 2019 at 12:17)</a>:</h4>
<p>probably because of the <code>return</code> that I added a comment on</p>



<a name="166261757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166261757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166261757">(May 22 2019 at 12:17)</a>:</h4>
<p>ahh ya, hehe</p>



<a name="166262066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166262066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166262066">(May 22 2019 at 12:23)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> should be ready now</p>



<a name="166262081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166262081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166262081">(May 22 2019 at 12:23)</a>:</h4>
<p>pushed but running tests locally also, just in case</p>



<a name="166262154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166262154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166262154">(May 22 2019 at 12:24)</a>:</h4>
<p>as you may see the None at the end and some empty things were to avoid the else of the if let and some other return None cases and just have it at the end</p>



<a name="166262159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166262159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166262159">(May 22 2019 at 12:24)</a>:</h4>
<p>that's I guess why the original code was in that way</p>



<a name="166262161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166262161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166262161">(May 22 2019 at 12:24)</a>:</h4>
<p>anyway, it's more or less similar</p>



<a name="166262162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166262162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166262162">(May 22 2019 at 12:24)</a>:</h4>
<p>:)</p>



<a name="166262209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166262209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166262209">(May 22 2019 at 12:25)</a>:</h4>
<p>yea, I prefer the new code you wrote, even if there are some additional <code>else</code>s</p>



<a name="166262332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166262332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166262332">(May 22 2019 at 12:27)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="166262333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166262333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166262333">(May 22 2019 at 12:27)</a>:</h4>
<p>tests are ok</p>



<a name="166296553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166296553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166296553">(May 22 2019 at 18:36)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <a href="https://github.com/rust-lang/rust/pull/61051" target="_blank" title="https://github.com/rust-lang/rust/pull/61051">https://github.com/rust-lang/rust/pull/61051</a> doesn't work, need to check what's going on</p>



<a name="166369151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166369151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166369151">(May 23 2019 at 15:03)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> pushed again <a href="https://github.com/rust-lang/rust/pull/61051" target="_blank" title="https://github.com/rust-lang/rust/pull/61051">https://github.com/rust-lang/rust/pull/61051</a>, still with failures :)</p>



<a name="166369182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166369182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166369182">(May 23 2019 at 15:03)</a>:</h4>
<p>with the Option trick we talked about</p>



<a name="166393029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166393029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166393029">(May 23 2019 at 19:42)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> another one <a href="https://github.com/rust-lang/rust/pull/61092" target="_blank" title="https://github.com/rust-lang/rust/pull/61092">https://github.com/rust-lang/rust/pull/61092</a></p>



<a name="166393203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166393203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166393203">(May 23 2019 at 19:44)</a>:</h4>
<p>and <a href="https://github.com/rust-lang/rust/pull/61093" target="_blank" title="https://github.com/rust-lang/rust/pull/61093">https://github.com/rust-lang/rust/pull/61093</a></p>



<a name="166395979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166395979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166395979">(May 23 2019 at 20:18)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/61094" target="_blank" title="https://github.com/rust-lang/rust/pull/61094">https://github.com/rust-lang/rust/pull/61094</a></p>



<a name="166398801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166398801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166398801">(May 23 2019 at 20:51)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/61099" target="_blank" title="https://github.com/rust-lang/rust/pull/61099">https://github.com/rust-lang/rust/pull/61099</a></p>



<a name="166408500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166408500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166408500">(May 23 2019 at 23:10)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/61102" target="_blank" title="https://github.com/rust-lang/rust/pull/61102">https://github.com/rust-lang/rust/pull/61102</a></p>



<a name="166408817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166408817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166408817">(May 23 2019 at 23:16)</a>:</h4>
<p>that last one seems to be not ok, unsure why</p>



<a name="166408822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166408822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166408822">(May 23 2019 at 23:16)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/61103" target="_blank" title="https://github.com/rust-lang/rust/pull/61103">https://github.com/rust-lang/rust/pull/61103</a></p>



<a name="166409592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166409592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166409592">(May 23 2019 at 23:29)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/61104" target="_blank" title="https://github.com/rust-lang/rust/pull/61104">https://github.com/rust-lang/rust/pull/61104</a></p>



<a name="166409646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166409646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166409646">(May 23 2019 at 23:30)</a>:</h4>
<p>this one ^^^ is also not ok</p>



<a name="166542564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166542564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166542564">(May 25 2019 at 20:29)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> <a href="https://github.com/rust-lang/rust/pull/61193" target="_blank" title="https://github.com/rust-lang/rust/pull/61193">https://github.com/rust-lang/rust/pull/61193</a></p>



<a name="166661146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661146">(May 27 2019 at 20:01)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <a href="https://github.com/rust-lang/rust/pull/61241" target="_blank" title="https://github.com/rust-lang/rust/pull/61241">https://github.com/rust-lang/rust/pull/61241</a></p>



<a name="166661189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661189">(May 27 2019 at 20:02)</a>:</h4>
<p>already open :P</p>



<a name="166661194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661194">(May 27 2019 at 20:02)</a>:</h4>
<p>irc pings are super fast</p>



<a name="166661197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661197">(May 27 2019 at 20:02)</a>:</h4>
<p>:P</p>



<a name="166661205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661205">(May 27 2019 at 20:02)</a>:</h4>
<p>do you have some kind of alert on github mentions?</p>



<a name="166661224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661224">(May 27 2019 at 20:03)</a>:</h4>
<p>tidy is ok and tests are ok</p>



<a name="166661231"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661231" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661231">(May 27 2019 at 20:03)</a>:</h4>
<p>there's another one coming which I'm running all the checks :)</p>



<a name="166661312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661312">(May 27 2019 at 20:05)</a>:</h4>
<p>there's an irc channel on the mozilla irc that will ping reviewers</p>



<a name="166661321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661321">(May 27 2019 at 20:05)</a>:</h4>
<p>although I'm not sure what I'm gonna do when the mozilla irc is shut down</p>



<a name="166661584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661584">(May 27 2019 at 20:11)</a>:</h4>
<p>hehehe</p>



<a name="166661588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661588">(May 27 2019 at 20:11)</a>:</h4>
<p>Zulip pings? :P</p>



<a name="166661747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661747">(May 27 2019 at 20:14)</a>:</h4>
<p>not enough automation</p>



<a name="166661782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661782">(May 27 2019 at 20:15)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <a href="https://github.com/rust-lang/rust/pull/61242" target="_blank" title="https://github.com/rust-lang/rust/pull/61242">https://github.com/rust-lang/rust/pull/61242</a> (auto msg)</p>



<a name="166661783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661783">(May 27 2019 at 20:15)</a>:</h4>
<p>:P</p>



<a name="166661786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661786">(May 27 2019 at 20:15)</a>:</h4>
<p>xD</p>



<a name="166661796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661796">(May 27 2019 at 20:15)</a>:</h4>
<p>you were pretty close time-wise this time</p>



<a name="166661798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661798">(May 27 2019 at 20:15)</a>:</h4>
<p>not even a second delay</p>



<a name="166661852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661852">(May 27 2019 at 20:16)</a>:</h4>
<p>already fixed the other PR, testing just in case</p>



<a name="166661932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661932">(May 27 2019 at 20:18)</a>:</h4>
<p>what's the meaning of this <a href="https://github.com/rust-lang/rust/pull/61242#issuecomment-496298345" target="_blank" title="https://github.com/rust-lang/rust/pull/61242#issuecomment-496298345">https://github.com/rust-lang/rust/pull/61242#issuecomment-496298345</a> ?</p>



<a name="166661964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661964">(May 27 2019 at 20:19)</a>:</h4>
<p>you can now <code>@bors r=oli-obk</code> without needing me to do anything</p>



<a name="166661967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661967">(May 27 2019 at 20:19)</a>:</h4>
<p>since I'm going to bed soonish</p>



<a name="166661968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661968">(May 27 2019 at 20:19)</a>:</h4>
<p>and this <a href="https://github.com/rust-lang/rust/pull/61241" target="_blank" title="https://github.com/rust-lang/rust/pull/61241">https://github.com/rust-lang/rust/pull/61241</a> is fixed</p>



<a name="166661976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661976">(May 27 2019 at 20:19)</a>:</h4>
<blockquote>
<p>you can now <code>@bors r=oli-obk</code> without needing me to do anything</p>
</blockquote>
<p>I was guessing that yeah :)</p>



<a name="166661980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166661980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166661980">(May 27 2019 at 20:19)</a>:</h4>
<p>wouldn't be better to rollup?</p>



<a name="166662071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166662071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166662071">(May 27 2019 at 20:21)</a>:</h4>
<p>if anyone makes a rollup, they'll probably be included irrelevant of whether they are marked with rollup</p>



<a name="166663558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166663558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166663558">(May 27 2019 at 20:53)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <a href="https://github.com/rust-lang/rust/pull/61247" target="_blank" title="https://github.com/rust-lang/rust/pull/61247">https://github.com/rust-lang/rust/pull/61247</a></p>



<a name="166664092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166664092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166664092">(May 27 2019 at 21:04)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <a href="https://github.com/rust-lang/rust/pull/61248" target="_blank" title="https://github.com/rust-lang/rust/pull/61248">https://github.com/rust-lang/rust/pull/61248</a></p>



<a name="166665790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166665790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166665790">(May 27 2019 at 21:45)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <a href="https://github.com/rust-lang/rust/pull/61249" target="_blank" title="https://github.com/rust-lang/rust/pull/61249">https://github.com/rust-lang/rust/pull/61249</a></p>



<a name="166701817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166701817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166701817">(May 28 2019 at 10:18)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> is correct :P</p>



<a name="166705793"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166705793" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166705793">(May 28 2019 at 11:19)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> should this one <a href="https://github.com/rust-lang/rust/pull/61249" target="_blank" title="https://github.com/rust-lang/rust/pull/61249">https://github.com/rust-lang/rust/pull/61249</a> be included?</p>



<a name="166705812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166705812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166705812">(May 28 2019 at 11:19)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span>  I was worried it would break my rollup cause you use <code>local</code> and rename it in two different PRs</p>



<a name="166705867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166705867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166705867">(May 28 2019 at 11:20)</a>:</h4>
<p>I'll include it in the next rollup</p>



<a name="166706216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166706216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166706216">(May 28 2019 at 11:25)</a>:</h4>
<p>yeah, true :)</p>



<a name="166715844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166715844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166715844">(May 28 2019 at 13:22)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <a href="https://github.com/rust-lang/rust/pull/61261" target="_blank" title="https://github.com/rust-lang/rust/pull/61261">https://github.com/rust-lang/rust/pull/61261</a></p>



<a name="166729124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166729124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166729124">(May 28 2019 at 15:43)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> <a href="https://github.com/rust-lang/rust/pull/61261" target="_blank" title="https://github.com/rust-lang/rust/pull/61261">https://github.com/rust-lang/rust/pull/61261</a> I guess I can also remove the middle commit</p>



<a name="166729153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166729153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166729153">(May 28 2019 at 15:44)</a>:</h4>
<p>I don't like that much doing this kind of back and forth ... hmm</p>



<a name="166729201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166729201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166729201">(May 28 2019 at 15:44)</a>:</h4>
<p>will be back in a bit</p>



<a name="166751737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166751737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166751737">(May 28 2019 at 19:40)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <span class="user-mention" data-user-id="126931">@centril</span> <a href="https://github.com/rust-lang/rust/pull/61249" target="_blank" title="https://github.com/rust-lang/rust/pull/61249">https://github.com/rust-lang/rust/pull/61249</a> and <a href="https://github.com/rust-lang/rust/pull/61261" target="_blank" title="https://github.com/rust-lang/rust/pull/61261">https://github.com/rust-lang/rust/pull/61261</a> both seems to be ready again to r+</p>



<a name="166751754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166751754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166751754">(May 28 2019 at 19:41)</a>:</h4>
<p>ci finished</p>



<a name="166789921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/166789921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#166789921">(May 29 2019 at 07:16)</a>:</h4>
<blockquote>
<p>I don't like that much doing this kind of back and forth ... hmm</p>
</blockquote>
<p><span aria-label="frown" class="emoji emoji-1f641" role="img" title="frown">:frown:</span> yea, not fun. But on the other hand, the code is super cleaned up now. Do you have any suggestions how to handle this better from the start?</p>



<a name="168604349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168604349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168604349">(Jun 20 2019 at 15:10)</a>:</h4>
<p>so ... current status of this for other to see ...</p>



<a name="168604355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168604355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168604355">(Jun 20 2019 at 15:11)</a>:</h4>
<div class="codehilite"><pre><span></span>error: variable does not need to be mutable
    --&gt; src/libcore/slice/mod.rs:3182:40
     |
3014 | / macro_rules! iterator {
3015 | |     (
3016 | |         struct $name:ident -&gt; $ptr:ty,
3017 | |         $elem:ty,
...    |
3182 | |             fn rposition&lt;P&gt;(&amp;mut self, mut predicate: P) -&gt; Option&lt;usize&gt; where
     | |                                        ----^^^^^^^^^
     | |                                        |
     | |                                        help: remove this `mut`
...    |
3260 | |     }
3261 | | }
     | |_- in this expansion of `iterator!`
...
3476 |   iterator!{struct IterMut -&gt; *mut T, &amp;&#39;a mut T, mut, {mut}, {}}
     |   -------------------------------------------------------------- in this macro invocation

error: aborting due to 59 previous errors
</pre></div>



<a name="168604381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168604381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168604381">(Jun 20 2019 at 15:11)</a>:</h4>
<p>getting 59 errors like this one, <code>variable does not need to be mutable</code></p>



<a name="168604413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168604413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168604413">(Jun 20 2019 at 15:11)</a>:</h4>
<p>I'm checking again but we have checked with <span class="user-mention" data-user-id="124288">@oli</span> and have no clue what's going on for now</p>



<a name="168604481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168604481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168604481">(Jun 20 2019 at 15:12)</a>:</h4>
<p>PR is <a href="https://github.com/rust-lang/rust/pull/60913" target="_blank" title="https://github.com/rust-lang/rust/pull/60913">https://github.com/rust-lang/rust/pull/60913</a></p>



<a name="168604492"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168604492" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168604492">(Jun 20 2019 at 15:12)</a>:</h4>
<p>/cc <span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="119009">@eddyb</span> in case you guys want to review the PR or help me debug :)</p>



<a name="168861310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168861310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168861310">(Jun 24 2019 at 15:48)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> just opened this <a href="https://github.com/rust-lang/rust/pull/62096" target="_blank" title="https://github.com/rust-lang/rust/pull/62096">https://github.com/rust-lang/rust/pull/62096</a></p>



<a name="168861355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168861355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168861355">(Jun 24 2019 at 15:49)</a>:</h4>
<p>btw, just to update the <code>Place 2.0</code> status here, I've found the <code>mut</code> error displayed in the previous messages</p>



<a name="168861382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168861382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168861382">(Jun 24 2019 at 15:50)</a>:</h4>
<p>getting other errors that for now we couldn't fix</p>



<a name="168861445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168861445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168861445">(Jun 24 2019 at 15:50)</a>:</h4>
<p><a href="https://gist.github.com/spastorino/7da6225651fb17ad4f0d8f48b4b32277" target="_blank" title="https://gist.github.com/spastorino/7da6225651fb17ad4f0d8f48b4b32277">https://gist.github.com/spastorino/7da6225651fb17ad4f0d8f48b4b32277</a></p>



<a name="168861452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168861452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168861452">(Jun 24 2019 at 15:50)</a>:</h4>
<p>in case someone wants to take a look</p>



<a name="168870543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168870543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168870543">(Jun 24 2019 at 17:57)</a>:</h4>
<blockquote>
<p><span class="user-mention silent" data-user-id="124288">oli</span> just opened this <a href="https://github.com/rust-lang/rust/pull/62096" target="_blank" title="https://github.com/rust-lang/rust/pull/62096">https://github.com/rust-lang/rust/pull/62096</a></p>
</blockquote>
<p><span class="user-mention" data-user-id="126931">@centril</span> addressed your comments</p>



<a name="168870868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168870868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168870868">(Jun 24 2019 at 18:00)</a>:</h4>
<p>thanks</p>



<a name="168871289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168871289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168871289">(Jun 24 2019 at 18:05)</a>:</h4>
<p>thanks to you :)</p>



<a name="168871337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168871337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168871337">(Jun 24 2019 at 18:05)</a>:</h4>
<p>I always have doubts about using Self vs explicitly using the type there</p>



<a name="168871445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168871445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168871445">(Jun 24 2019 at 18:06)</a>:</h4>
<p>if the block is a bit long it may be confusing to see Self but well I guess you should have a nice IDE :)</p>



<a name="168874079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168874079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168874079">(Jun 24 2019 at 18:36)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> My philosophy on <code>Self</code> is to always use it when possible</p>



<a name="168874096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168874096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168874096">(Jun 24 2019 at 18:36)</a>:</h4>
<p>It's very nice for maintainability</p>



<a name="168939922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168939922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168939922">(Jun 25 2019 at 13:48)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <span class="user-mention" data-user-id="126931">@centril</span> rebased <a href="https://github.com/rust-lang/rust/pull/62096" target="_blank" title="https://github.com/rust-lang/rust/pull/62096">https://github.com/rust-lang/rust/pull/62096</a> after the conflict, how is the right procedure to follow after the PR was r+, there's a conflict and I've already fixed it? should I do r=oli ? should somebody else do that?</p>



<a name="168940136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168940136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168940136">(Jun 25 2019 at 13:50)</a>:</h4>
<p>r+ed</p>



<a name="168940234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168940234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168940234">(Jun 25 2019 at 13:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> if you are doing a trivial rebase that has no impact on the idea of the PR then just r=reviewer</p>



<a name="168940250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168940250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168940250">(Jun 25 2019 at 13:51)</a>:</h4>
<p>same with tidy problems and such</p>



<a name="168940689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168940689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168940689">(Jun 25 2019 at 13:56)</a>:</h4>
<p>yeah, was exactly that</p>



<a name="168940698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168940698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168940698">(Jun 25 2019 at 13:56)</a>:</h4>
<p>zero risk</p>



<a name="168940707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168940707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168940707">(Jun 25 2019 at 13:56)</a>:</h4>
<p>thanks</p>



<a name="168953813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168953813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168953813">(Jun 25 2019 at 16:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> which PR contains the code that you're having problems with, if I were to go check it out? Is it <a href="https://github.com/rust-lang/rust/issues/60913" target="_blank" title="https://github.com/rust-lang/rust/issues/60913">#60913</a>?</p>



<a name="168953846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168953846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168953846">(Jun 25 2019 at 16:35)</a>:</h4>
<p>yes</p>



<a name="168953850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168953850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168953850">(Jun 25 2019 at 16:35)</a>:</h4>
<p>that one</p>



<a name="168953902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168953902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168953902">(Jun 25 2019 at 16:36)</a>:</h4>
<p>I've run master and place branches and compared the debug info and it's the same</p>



<a name="168953908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168953908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168953908">(Jun 25 2019 at 16:36)</a>:</h4>
<p>was hoping to see some differences</p>



<a name="168958045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168958045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168958045">(Jun 25 2019 at 17:24)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> so I get a panic like this</p>
<div class="codehilite"><pre><span></span>thread &#39;rustc&#39; panicked at &#39;Layout mismatch when copying!
</pre></div>



<a name="168959478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168959478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168959478">(Jun 25 2019 at 17:39)</a>:</h4>
<p>that looks different from what you get, right <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> ?</p>



<a name="168962878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168962878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168962878">(Jun 25 2019 at 18:16)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yes</p>



<a name="168968906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168968906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168968906">(Jun 25 2019 at 19:25)</a>:</h4>
<p>so this is where it's failing in case you haven't seen the thing <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/interpret/place.rs#L827" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/interpret/place.rs#L827">https://github.com/rust-lang/rust/blob/master/src/librustc_mir/interpret/place.rs#L827</a></p>



<a name="168968993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168968993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168968993">(Jun 25 2019 at 19:26)</a>:</h4>
<p>src.layout.details is different than dest.layout.details</p>



<a name="168969005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168969005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168969005">(Jun 25 2019 at 19:26)</a>:</h4>
<p>src.layout.details ...</p>



<a name="168969007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168969007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168969007">(Jun 25 2019 at 19:26)</a>:</h4>
<div class="codehilite"><pre><span></span>            variants: Single {
                index: 0,
            },
            fields: Array {
                stride: Size {
                    raw: 1,
                },
                count: 16,
            },
            abi: Aggregate {
                sized: true,
            },
            align: AbiAndPrefAlign {
                abi: Align {
                    pow2: 0,
                },
                pref: Align {
                    pow2: 0,
                },
            },
            size: Size {
                raw: 16,
            },
</pre></div>



<a name="168969009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168969009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168969009">(Jun 25 2019 at 19:26)</a>:</h4>
<p>dest.layout.details ...</p>



<a name="168969030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168969030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168969030">(Jun 25 2019 at 19:27)</a>:</h4>
<div class="codehilite"><pre><span></span>            variants: Single {
                index: 0,
            },
            fields: Union(
                2,
            ),
            abi: Aggregate {
                sized: true,
            },
            align: AbiAndPrefAlign {
                abi: Align {
                    pow2: 4,
                },
                pref: Align {
                    pow2: 4,
                },
            },
            size: Size {
                raw: 16,
            },
</pre></div>



<a name="168969050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168969050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168969050">(Jun 25 2019 at 19:27)</a>:</h4>
<p>fields Array for src and fields Union for dest</p>



<a name="168969062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168969062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168969062">(Jun 25 2019 at 19:27)</a>:</h4>
<p>unsure where is that generated exactly</p>



<a name="168970141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168970141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168970141">(Jun 25 2019 at 19:40)</a>:</h4>
<p>What's the concrete union's type name</p>



<a name="168970145"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168970145" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168970145">(Jun 25 2019 at 19:40)</a>:</h4>
<p>Maybe you can grep that</p>



<a name="168971448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168971448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168971448">(Jun 25 2019 at 19:56)</a>:</h4>
<p>yeah ok</p>



<a name="168971462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168971462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168971462">(Jun 25 2019 at 19:56)</a>:</h4>
<p>I'm also trying with <code>-Zdump-mir=all</code></p>



<a name="168971470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168971470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168971470">(Jun 25 2019 at 19:56)</a>:</h4>
<p>though that's...taking a lon time :)</p>



<a name="168971543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168971543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168971543">(Jun 25 2019 at 19:57)</a>:</h4>
<p>seems like it dies after generating  rustc.raw-imp-{{impl}}-static_empty.003-018.ConstProp.before.mir</p>



<a name="168971601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168971601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168971601">(Jun 25 2019 at 19:58)</a>:</h4>
<p>OOPS</p>



<a name="168971790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168971790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168971790">(Jun 25 2019 at 20:00)</a>:</h4>
<p>that seems to roughly align with</p>
<div class="codehilite"><pre><span></span>query stack during panic:
#0 [optimized_mir] processing `raw::imp::Group::static_empty`
end of query stack
</pre></div>



<a name="168971831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168971831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168971831">(Jun 25 2019 at 20:00)</a>:</h4>
<p>though I'm not sure it's 100% right</p>



<a name="168971903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168971903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168971903">(Jun 25 2019 at 20:01)</a>:</h4>
<div class="codehilite"><pre><span></span>// MIR for `raw::imp::&lt;impl at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:23:1: 140:2&gt;::static_empty`
// source = MirSource { instance: Item(DefId(0:1389 ~ hashbrown[b7a2]::raw[0]::imp[0]::{{impl}}[0]::static_empty[0])), promoted: None }
// pass_name = ConstProp
// disambiguator = before

fn  raw::imp::&lt;impl at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:23:1: 140:2&gt;::static_empty() -&gt; &amp;[u8] {
    let mut _0: &amp;[u8];                   // return place in scope 0 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:32:30: 32:43
    let mut _1: &amp;[u8; 16];               // in scope 0 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:40:18: 40:38
    let mut _2: &amp;[u8; 16];               // in scope 0 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:40:18: 40:38
    let mut _3: raw::imp::Group::static_empty::AlignedBytes; // in scope 0 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:40:19: 40:32
    scope 1 {
    }

    bb0: {
        StorageLive(_1);                 // bb0[0]: scope 1 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:40:18: 40:38
        StorageLive(_2);                 // bb0[1]: scope 1 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:40:18: 40:38
        _2 = &amp;(promoted[0]: raw::imp::Group::static_empty::AlignedBytes); // bb0[2]: scope 1 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:40:18: 40:38
        _1 = _2;                         // bb0[3]: scope 1 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:40:18: 40:38
        _0 = move _1 as &amp;[u8] (Pointer(Unsize)); // bb0[4]: scope 1 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:40:18: 40:38
        StorageDead(_1);                 // bb0[5]: scope 1 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:40:37: 40:38
        StorageDead(_2);                 // bb0[6]: scope 0 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:41:5: 41:6
        return;                          // bb0[7]: scope 0 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:41:6: 41:6
    }

    bb1 (cleanup): {
        resume;                          // bb1[0]: scope 0 at /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:32:5: 41:6
    }
}
</pre></div>



<a name="168971953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168971953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168971953">(Jun 25 2019 at 20:02)</a>:</h4>
<p>there, that looks right</p>



<a name="168972127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972127">(Jun 25 2019 at 20:04)</a>:</h4>
<p>though I don't quite understand which copy is generating the problem</p>



<a name="168972136"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972136" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972136">(Jun 25 2019 at 20:04)</a>:</h4>
<p>still, <code>_2 = &amp;(promoted[0]: AlignedBytes)</code> seems wrong</p>



<a name="168972171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972171">(Jun 25 2019 at 20:05)</a>:</h4>
<p>later we get this error:</p>
<div class="codehilite"><pre><span></span>error: internal compiler error: broken MIR in DefId(0:1389 ~ hashbrown[b7a2]::raw[0]::imp[0]::{{impl}}[0]::static_empty[0]) (_0 = move (_1.1: [u8; 16])): bad assignment (raw::imp::Group::static_empty::Align\
edBytes = [u8; 16]): NoSolution
  --&gt; /home/nmatsakis/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.4.0/src/raw/sse2.rs:40:18
   |
40 |         unsafe { &amp;ALIGNED_BYTES.bytes }
   |                  ^^^^^^^^^^^^^^^^^^^^
</pre></div>



<a name="168972183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972183">(Jun 25 2019 at 20:05)</a>:</h4>
<p>which seems also in that same spot</p>



<a name="168972193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972193">(Jun 25 2019 at 20:05)</a>:</h4>
<blockquote>
<p>still, <code>_2 = &amp;(promoted[0]: AlignedBytes)</code> seems wrong</p>
</blockquote>
<p>to be clear, it seems like a type mismatch: the RHS is &amp;AlignedBytes, I guess, and the LHS is &amp;[u8; 16]</p>



<a name="168972263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972263">(Jun 25 2019 at 20:06)</a>:</h4>
<p>I think the problem is just the type</p>



<a name="168972277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972277">(Jun 25 2019 at 20:06)</a>:</h4>
<p>if I look at <code>rustc.raw-imp-{{impl}}-static_empty-promoted[0].002-001.SimplifyCfg-qualify-consts.after.mir </code></p>



<a name="168972280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972280">(Jun 25 2019 at 20:06)</a>:</h4>
<p>it has:</p>



<a name="168972288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972288">(Jun 25 2019 at 20:06)</a>:</h4>
<p><code>_0 = move (_1.1: [u8; 16]);</code></p>



<a name="168972310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972310">(Jun 25 2019 at 20:07)</a>:</h4>
<p>which looks correct</p>



<a name="168972317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972317">(Jun 25 2019 at 20:07)</a>:</h4>
<p>however, it also has <code>let mut _0: raw::imp::Group::static_empty::AlignedBytes;</code></p>



<a name="168972319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972319">(Jun 25 2019 at 20:07)</a>:</h4>
<p>which looks wrong</p>



<a name="168972334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972334">(Jun 25 2019 at 20:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> so it seems like the problem lies in the updates to the "constant promotion" code</p>



<a name="168972411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972411">(Jun 25 2019 at 20:08)</a>:</h4>
<p>yeah, I've reached that final conclusion a bit less informed than your procedure :P, but couldn't find what's wrong there</p>



<a name="168972414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972414">(Jun 25 2019 at 20:08)</a>:</h4>
<p><code>src/librustc_mir/transform/promote_consts.rs </code>  or maybe <code>src/librustc_mir/transform/qualify_consts.rs </code></p>



<a name="168972424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972424">(Jun 25 2019 at 20:08)</a>:</h4>
<p>although I think that <span class="user-mention" data-user-id="124288">@oli</span> is the world expert on that code :)</p>



<a name="168972429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972429">(Jun 25 2019 at 20:08)</a>:</h4>
<p>well, let's see...</p>



<a name="168972454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972454">(Jun 25 2019 at 20:08)</a>:</h4>
<p>and if you talk about the type I guess the Place::ty_from calls are the suspicious ones</p>



<a name="168972474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972474">(Jun 25 2019 at 20:09)</a>:</h4>
<p>I've found in a place where I used proj when I should have used proj.base in the past</p>



<a name="168972483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972483">(Jun 25 2019 at 20:09)</a>:</h4>
<p>but right now that doesn't seem to be the case</p>



<a name="168972506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972506">(Jun 25 2019 at 20:09)</a>:</h4>
<p>OK -- I have to run at the moment</p>



<a name="168972667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972667">(Jun 25 2019 at 20:11)</a>:</h4>
<p>this section <a href="https://github.com/rust-lang/rust/pull/60913/files#diff-bfc61a84a9e3b48761db14b8d6772a0aL311" target="_blank" title="https://github.com/rust-lang/rust/pull/60913/files#diff-bfc61a84a9e3b48761db14b8d6772a0aL311">https://github.com/rust-lang/rust/pull/60913/files#diff-bfc61a84a9e3b48761db14b8d6772a0aL311</a> is a bit suspicious</p>



<a name="168972910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168972910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168972910">(Jun 25 2019 at 20:14)</a>:</h4>
<p>and actually that's only place_base and None, no need to do the while thing</p>



<a name="168976402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168976402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168976402">(Jun 25 2019 at 20:54)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> the problem is here <a href="https://github.com/rust-lang/rust/pull/60913/files#diff-bfc61a84a9e3b48761db14b8d6772a0aL312" target="_blank" title="https://github.com/rust-lang/rust/pull/60913/files#diff-bfc61a84a9e3b48761db14b8d6772a0aL312">https://github.com/rust-lang/rust/pull/60913/files#diff-bfc61a84a9e3b48761db14b8d6772a0aL312</a></p>



<a name="168976491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168976491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168976491">(Jun 25 2019 at 20:54)</a>:</h4>
<p>if instead of going to the traversing the projection and end in the base, I just use the place that's there the code compiles</p>



<a name="168976512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168976512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168976512">(Jun 25 2019 at 20:55)</a>:</h4>
<p>of course that's not what the code was doing before, I was just playing with things to see what happens</p>



<a name="168976523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168976523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168976523">(Jun 25 2019 at 20:55)</a>:</h4>
<p>so ... from the old code seems like I need to use just the base</p>



<a name="168976549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168976549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168976549">(Jun 25 2019 at 20:55)</a>:</h4>
<p>one of my tries was to replace all that code with <code>let ty = place.base.ty(local_decls).ty;</code> but that doesn't work</p>



<a name="168976554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168976554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168976554">(Jun 25 2019 at 20:55)</a>:</h4>
<p>unsure why and what's going on</p>



<a name="168976844"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168976844" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168976844">(Jun 25 2019 at 20:59)</a>:</h4>
<p>hmm I think we need to do ty over place.base and call replace over place.base too</p>



<a name="168976862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168976862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168976862">(Jun 25 2019 at 20:59)</a>:</h4>
<p>I'm not sure and need to go now, going to check this later/tomorrow</p>



<a name="168978504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168978504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168978504">(Jun 25 2019 at 21:19)</a>:</h4>
<p><span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span> of course</p>



<a name="168978524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168978524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168978524">(Jun 25 2019 at 21:19)</a>:</h4>
<p>The code below uses the place variable that used to be mutated by the old code</p>



<a name="168997406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168997406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168997406">(Jun 26 2019 at 03:45)</a>:</h4>
<p>so yeah, definitely, the code is compiling and tests passing right now :)</p>



<a name="168997452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168997452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168997452">(Jun 26 2019 at 03:46)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> ^^^</p>



<a name="168997459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168997459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168997459">(Jun 26 2019 at 03:46)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> there are 2 new commits that I'm not sure you have checked</p>



<a name="168997460"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168997460" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168997460">(Jun 26 2019 at 03:46)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/60913/commits/2422a0f368a7b575720cce3056f53562a1d8338f" target="_blank" title="https://github.com/rust-lang/rust/pull/60913/commits/2422a0f368a7b575720cce3056f53562a1d8338f">https://github.com/rust-lang/rust/pull/60913/commits/2422a0f368a7b575720cce3056f53562a1d8338f</a></p>



<a name="168997462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168997462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168997462">(Jun 26 2019 at 03:46)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/60913/commits/73cf88b959b3836213c23792e50e61330042d49d" target="_blank" title="https://github.com/rust-lang/rust/pull/60913/commits/73cf88b959b3836213c23792e50e61330042d49d">https://github.com/rust-lang/rust/pull/60913/commits/73cf88b959b3836213c23792e50e61330042d49d</a></p>



<a name="168997474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168997474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168997474">(Jun 26 2019 at 03:47)</a>:</h4>
<p>if you're ok with those I can ...</p>



<a name="168997480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168997480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168997480">(Jun 26 2019 at 03:47)</a>:</h4>
<p>1. squash everything into one commit with a meaningful commit message</p>



<a name="168997481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168997481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168997481">(Jun 26 2019 at 03:48)</a>:</h4>
<p>2. <del>fix tidy</del> done in <a href="https://github.com/rust-lang/rust/pull/60913/commits/542081f670a258f3d9cda6e978a8b74d9dba69ca" target="_blank" title="https://github.com/rust-lang/rust/pull/60913/commits/542081f670a258f3d9cda6e978a8b74d9dba69ca">https://github.com/rust-lang/rust/pull/60913/commits/542081f670a258f3d9cda6e978a8b74d9dba69ca</a></p>



<a name="168997522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168997522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168997522">(Jun 26 2019 at 03:48)</a>:</h4>
<p>3. get rid of clones (?)</p>



<a name="168997526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168997526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168997526">(Jun 26 2019 at 03:48)</a>:</h4>
<p>or do you have a different plan?</p>



<a name="168997732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/168997732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#168997732">(Jun 26 2019 at 03:55)</a>:</h4>
<p>just have rebased on top of the <code>Place::from</code> change, so the diff should be a bit smaller</p>



<a name="169006272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169006272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169006272">(Jun 26 2019 at 07:29)</a>:</h4>
<p>Yes, only 3. is left now</p>



<a name="169015110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169015110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169015110">(Jun 26 2019 at 10:05)</a>:</h4>
<blockquote>
<p>so yeah, definitely, the code is compiling and tests passing right now :)</p>
</blockquote>
<p>woohoo!</p>



<a name="169021062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169021062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169021062">(Jun 26 2019 at 11:47)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> about the clones, do you think we need to pass around <code>place_base</code> and <code>place_projection</code> separately?</p>



<a name="169021099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169021099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169021099">(Jun 26 2019 at 11:48)</a>:</h4>
<p>should we use some kind of abstraction over that?</p>



<a name="169021141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169021141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169021141">(Jun 26 2019 at 11:48)</a>:</h4>
<p>hmm... an abstraction may make it easier (less churn) to move to slices</p>



<a name="169021163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169021163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169021163">(Jun 26 2019 at 11:48)</a>:</h4>
<p>what kind of abstraction are you thinking about that make things easier to move to slices?</p>



<a name="169021258"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169021258" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169021258">(Jun 26 2019 at 11:50)</a>:</h4>
<p>If you have a struct <code>PlaceRef&lt;'a&gt; { base: &amp;'a PlaceBase, proj: Option&lt;&amp;'a Projection&gt; }</code>, then when we move to slices we can just change the <code>proj</code> field in the definition instead of touching every use of the <code>PlaceRef</code> struct</p>



<a name="169021382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169021382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169021382">(Jun 26 2019 at 11:52)</a>:</h4>
<p>yeah, that's exactly what I was thinking about <code>PlaceRef</code></p>



<a name="169021491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169021491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169021491">(Jun 26 2019 at 11:54)</a>:</h4>
<p>heh, we're slowly syncing our brains on place related things</p>



<a name="169021669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169021669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169021669">(Jun 26 2019 at 11:56)</a>:</h4>
<p>yeah, to be honest wasn't seeing that clearly that would make migrating to slices easier</p>



<a name="169021670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169021670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169021670">(Jun 26 2019 at 11:57)</a>:</h4>
<p>:)</p>



<a name="169021904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169021904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169021904">(Jun 26 2019 at 12:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span>  Reading your PRs makes me want <a href="https://ghc.haskell.org/trac/ghc/wiki/PatternSynonyms" target="_blank" title="https://ghc.haskell.org/trac/ghc/wiki/PatternSynonyms">https://ghc.haskell.org/trac/ghc/wiki/PatternSynonyms</a> so much :D</p>



<a name="169031085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169031085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169031085">(Jun 26 2019 at 13:46)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> hehe, yeah, seems good :)</p>



<a name="169031107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169031107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169031107">(Jun 26 2019 at 13:47)</a>:</h4>
<p>what pattern repetition in particular caused you to think that?</p>



<a name="169031120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169031120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169031120">(Jun 26 2019 at 13:47)</a>:</h4>
<p>I know there are a bunch, just asking for curiosity :)</p>



<a name="169031131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169031131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169031131">(Jun 26 2019 at 13:47)</a>:</h4>
<p>I guess:</p>



<a name="169031158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169031158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169031158">(Jun 26 2019 at 13:47)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="n">Place</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">base</span>: <span class="nc">PlaceBase</span>::<span class="n">Local</span><span class="p">(</span><span class="n">local</span><span class="p">),</span><span class="w"></span>
<span class="w">    </span><span class="n">projection</span>: <span class="nb">None</span><span class="p">,</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="169031162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169031162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169031162">(Jun 26 2019 at 13:47)</a>:</h4>
<p>that's one :)</p>



<a name="169031166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169031166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169031166">(Jun 26 2019 at 13:48)</a>:</h4>
<p>oh yes</p>



<a name="169031213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169031213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169031213">(Jun 26 2019 at 13:48)</a>:</h4>
<p>that one</p>



<a name="169031246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169031246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169031246">(Jun 26 2019 at 13:48)</a>:</h4>
<p>I think we'll be able to remove a bunch of these in a cleanup PR</p>



<a name="169031251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169031251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169031251">(Jun 26 2019 at 13:48)</a>:</h4>
<p><code>LocalPlace(local) =&gt;</code></p>



<a name="169032956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169032956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169032956">(Jun 26 2019 at 14:02)</a>:</h4>
<blockquote>
<p>I think we'll be able to remove a bunch of these in a cleanup PR</p>
</blockquote>
<p>also true :)</p>



<a name="169036462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169036462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169036462">(Jun 26 2019 at 14:37)</a>:</h4>
<p>now that this compiles and tests are green, we were discussing a bit with <span class="user-mention" data-user-id="124288">@oli</span> how to fix some things that I did to make the first step easier</p>



<a name="169036494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169036494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169036494">(Jun 26 2019 at 14:37)</a>:</h4>
<p>in particular I've used some clones that should not end there</p>



<a name="169036547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169036547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169036547">(Jun 26 2019 at 14:38)</a>:</h4>
<p>the idea was that in this same PR I'm going to put another commit to get rid of them</p>



<a name="169036617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169036617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169036617">(Jun 26 2019 at 14:38)</a>:</h4>
<p>for instance <a href="https://github.com/rust-lang/rust/pull/60913/files#diff-56ccd2e94681399314ad7501883bd2a5R471" target="_blank" title="https://github.com/rust-lang/rust/pull/60913/files#diff-56ccd2e94681399314ad7501883bd2a5R471">https://github.com/rust-lang/rust/pull/60913/files#diff-56ccd2e94681399314ad7501883bd2a5R471</a> we build a Place again there</p>



<a name="169036634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169036634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169036634">(Jun 26 2019 at 14:39)</a>:</h4>
<p>we should be passing a reference to base and projection down</p>



<a name="169036658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169036658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169036658">(Jun 26 2019 at 14:39)</a>:</h4>
<p>we were mentioning two possibilities</p>



<a name="169036660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169036660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169036660">(Jun 26 2019 at 14:39)</a>:</h4>
<p>or we do <code>PlaceRef&lt;'a&gt; { base: &amp;'a PlaceBase, proj: Option&lt;&amp;'a Projection&gt; }</code></p>



<a name="169036770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169036770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169036770">(Jun 26 2019 at 14:40)</a>:</h4>
<p>or the other alternative is to keep using <code>Place</code> and just intern the fields</p>



<a name="169036780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/169036780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#169036780">(Jun 26 2019 at 14:40)</a>:</h4>
<p>/cc <span class="user-mention" data-user-id="119009">@eddyb</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> in particular but @others are welcome to give some thoughts :)</p>



<a name="173223559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/173223559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#173223559">(Aug 14 2019 at 17:23)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> the new bootstrap compiler is being changed in a PR that's being tested by bors right now <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="173228885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/173228885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#173228885">(Aug 14 2019 at 18:26)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> great, so I can get rid of a lot of weird things due to now being able to use slice patterns :)</p>



<a name="173228898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/173228898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#173228898">(Aug 14 2019 at 18:26)</a>:</h4>
<p>yea</p>



<a name="173228908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/173228908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#173228908">(Aug 14 2019 at 18:26)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> hopefully slice patterns will be stable soon</p>



<a name="173273313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/173273313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#173273313">(Aug 15 2019 at 08:17)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span>  good news; the new bootstrap compiler is out <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="173273985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/173273985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#173273985">(Aug 15 2019 at 08:32)</a>:</h4>
<p>Yay</p>



<a name="174063385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174063385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174063385">(Aug 25 2019 at 02:08)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> <span class="user-mention" data-user-id="124288">@oli</span> fixes for Centril comments <a href="https://github.com/rust-lang/rust/pull/63874" target="_blank" title="https://github.com/rust-lang/rust/pull/63874">https://github.com/rust-lang/rust/pull/63874</a></p>



<a name="174063406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174063406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174063406">(Aug 25 2019 at 02:09)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> reviewed</p>



<a name="174063464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174063464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174063464">(Aug 25 2019 at 02:10)</a>:</h4>
<p>cool</p>



<a name="174063469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174063469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174063469">(Aug 25 2019 at 02:11)</a>:</h4>
<p>btw, I've just pushed the main one</p>



<a name="174063470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174063470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174063470">(Aug 25 2019 at 02:11)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/63420" target="_blank" title="https://github.com/rust-lang/rust/pull/63420">https://github.com/rust-lang/rust/pull/63420</a></p>



<a name="174063473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174063473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174063473">(Aug 25 2019 at 02:11)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> we may want to run perf again I guess</p>



<a name="174063476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174063476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174063476">(Aug 25 2019 at 02:11)</a>:</h4>
<p>but max-rss is very bad in some cases</p>



<a name="174063479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174063479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174063479">(Aug 25 2019 at 02:11)</a>:</h4>
<p>I'd leave the judge up to you but we can wait the merge and keep working on interning the thing in the same PR, new commits</p>



<a name="174063767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174063767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174063767">(Aug 25 2019 at 02:21)</a>:</h4>
<p>Heh kekkac obviously</p>



<a name="174063769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174063769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174063769">(Aug 25 2019 at 02:21)</a>:</h4>
<p>That's like the mother of all mir Bodies</p>



<a name="174064054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174064054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174064054">(Aug 25 2019 at 02:31)</a>:</h4>
<p>Maybe we should just use smallvec&lt;Elem&gt; instead of Box&lt;[Elem]&gt;</p>



<a name="174064055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174064055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174064055">(Aug 25 2019 at 02:31)</a>:</h4>
<p>Not sure if that helps</p>



<a name="174064173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174064173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174064173">(Aug 25 2019 at 02:35)</a>:</h4>
<p>hehehe</p>



<a name="174064174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174064174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174064174">(Aug 25 2019 at 02:35)</a>:</h4>
<p>just force pushed again, there was a tidy error</p>



<a name="174064232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174064232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174064232">(Aug 25 2019 at 02:37)</a>:</h4>
<p>ran perf again, things are not going to change much I guess</p>



<a name="174064235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174064235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174064235">(Aug 25 2019 at 02:37)</a>:</h4>
<p>didn't try with smallvec</p>



<a name="174064236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174064236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174064236">(Aug 25 2019 at 02:37)</a>:</h4>
<p>do you think it worth? or should we go directly to interning?</p>



<a name="174065226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174065226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174065226">(Aug 25 2019 at 03:12)</a>:</h4>
<p>Yea we could just intern directly. Keep that in a different commit tho</p>



<a name="174148724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174148724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174148724">(Aug 26 2019 at 14:56)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> if there's anything I can help with, please let me know! I'd love to get this merged <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="174149301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174149301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174149301">(Aug 26 2019 at 15:03)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span> probably not for now, but I guess we can talk and I'm 100% open to pair on this if you want</p>



<a name="174149317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174149317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174149317">(Aug 26 2019 at 15:04)</a>:</h4>
<p>I think right now things are not very parallelizable</p>



<a name="174149321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174149321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174149321">(Aug 26 2019 at 15:04)</a>:</h4>
<p>Well, I don't want to slow you down</p>



<a name="174149386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174149386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174149386">(Aug 26 2019 at 15:04)</a>:</h4>
<p>But if you hit a point where you could hand something off, feel free to ping me</p>



<a name="174149413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174149413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174149413">(Aug 26 2019 at 15:04)</a>:</h4>
<p>sure</p>



<a name="174149451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174149451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174149451">(Aug 26 2019 at 15:05)</a>:</h4>
<p>also, first I may need to finish something that it's 95% done and then we can talk I guess</p>



<a name="174149469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174149469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174149469">(Aug 26 2019 at 15:05)</a>:</h4>
<p>Sounds good!</p>



<a name="174843536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174843536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174843536">(Sep 04 2019 at 01:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span>, when you get a chance could you take a look at <a href="https://github.com/rust-lang/rust/issues/64005" target="_blank" title="https://github.com/rust-lang/rust/issues/64005">#64005</a>?</p>



<a name="174850243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174850243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174850243">(Sep 04 2019 at 04:24)</a>:</h4>
<p>yes, gonna try to do it tomorrow</p>



<a name="174850284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174850284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174850284">(Sep 04 2019 at 04:24)</a>:</h4>
<p>sorry about that, was very busy after RustConf</p>



<a name="174850319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174850319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174850319">(Sep 04 2019 at 04:25)</a>:</h4>
<p>np</p>



<a name="174850454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174850454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174850454">(Sep 04 2019 at 04:29)</a>:</h4>
<p><span class="user-mention" data-user-id="118594">@ecstatic-morse</span> actually, just did it :)</p>



<a name="174850773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174850773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174850773">(Sep 04 2019 at 04:38)</a>:</h4>
<p>Thanks! Yeah the name is a little awkward, especially since using it results in a lot of <code>!is_indirect()</code>. <code>is_direct</code> is too opaque, and I think <code>has_deref_projection</code>is maybe too literal? I originally had a method called <code>base_direct</code> which returned <code>Some(base)</code> if there were no deref projections.</p>



<a name="174850792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174850792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174850792">(Sep 04 2019 at 04:39)</a>:</h4>
<p>but now that you don't need to traverse projections to get to the base, that seems a bit silly</p>



<a name="174850859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174850859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174850859">(Sep 04 2019 at 04:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> ^</p>



<a name="174852311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/174852311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dylan MacKenzie (ecstatic-morse) <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#174852311">(Sep 04 2019 at 05:21)</a>:</h4>
<p>I kind of like <code>contains_indirection</code> or <code>contains_deref</code>. <code>is_indirection</code> makes it seem like it only returns <code>true</code> for  <code>*x</code>, not (*x.field)[2]. <code>is_indirect</code> is nice because it's short and more abstract.</p>



<a name="175657508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175657508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175657508">(Sep 13 2019 at 19:39)</a>:</h4>
<p>this other bit <a href="https://github.com/rust-lang/rust/pull/63420" target="_blank" title="https://github.com/rust-lang/rust/pull/63420">https://github.com/rust-lang/rust/pull/63420</a> is in</p>



<a name="175657611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175657611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175657611">(Sep 13 2019 at 19:40)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span> what are you currently working on? :)</p>



<a name="175657638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175657638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175657638">(Sep 13 2019 at 19:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> <a href="https://github.com/rust-lang/rust/pull/64419" target="_blank" title="https://github.com/rust-lang/rust/pull/64419">https://github.com/rust-lang/rust/pull/64419</a></p>



<a name="175657655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175657655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175657655">(Sep 13 2019 at 19:41)</a>:</h4>
<p>I think it will be ready to merge sometime this weekend.</p>



<a name="175657790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175657790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175657790">(Sep 13 2019 at 19:43)</a>:</h4>
<p>cool</p>



<a name="175657885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175657885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175657885">(Sep 13 2019 at 19:44)</a>:</h4>
<p>What's the next step for Places?</p>



<a name="175657930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175657930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175657930">(Sep 13 2019 at 19:45)</a>:</h4>
<p>my pr is going to give you some pains :P</p>



<a name="175657940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175657940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175657940">(Sep 13 2019 at 19:45)</a>:</h4>
<p>well, not that many I think</p>



<a name="175657944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175657944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175657944">(Sep 13 2019 at 19:45)</a>:</h4>
<p>this <a href="https://github.com/rust-lang/rust/pull/64419/files#diff-9e103702275cbef342c2decd3395bf3bL285" target="_blank" title="https://github.com/rust-lang/rust/pull/64419/files#diff-9e103702275cbef342c2decd3395bf3bL285">https://github.com/rust-lang/rust/pull/64419/files#diff-9e103702275cbef342c2decd3395bf3bL285</a> doesn't exist anymore</p>



<a name="175657955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175657955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175657955">(Sep 13 2019 at 19:46)</a>:</h4>
<blockquote>
<p>What's the next step for Places?</p>
</blockquote>
<p>there are not big plans yet afaik</p>



<a name="175658005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175658005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175658005">(Sep 13 2019 at 19:46)</a>:</h4>
<p>gonna do little things meanwhile</p>



<a name="175658024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175658024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175658024">(Sep 13 2019 at 19:46)</a>:</h4>
<p>I actually got rid of that call entirely so that should be easy to merge.</p>



<a name="175658029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175658029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175658029">(Sep 13 2019 at 19:46)</a>:</h4>
<p>Gotcha</p>



<a name="175658283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175658283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175658283">(Sep 13 2019 at 19:50)</a>:</h4>
<p>I might play around with this <a href="#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Place.20size/near/171701734" title="#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Place.20size/near/171701734">https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Place.20size/near/171701734</a> unless that's one of the things you were going to look at</p>



<a name="175660130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175660130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175660130">(Sep 13 2019 at 20:13)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span> that would be the big next step</p>



<a name="175660154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175660154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175660154">(Sep 13 2019 at 20:13)</a>:</h4>
<p>but we have talked about it with Oli and he said that's better to put that on hold until there's a design meeting</p>



<a name="175660233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175660233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175660233">(Sep 13 2019 at 20:14)</a>:</h4>
<p>I guess once we do that we could talk about it?</p>



<a name="175660246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175660246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175660246">(Sep 13 2019 at 20:15)</a>:</h4>
<p>I want to do that as next step, yeah</p>



<a name="175845682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175845682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175845682">(Sep 16 2019 at 19:46)</a>:</h4>
<p><span class="user-mention" data-user-id="126931">@centril</span> <a href="https://github.com/rust-lang/rust/pull/64518#discussion_r324852427" target="_blank" title="https://github.com/rust-lang/rust/pull/64518#discussion_r324852427">https://github.com/rust-lang/rust/pull/64518#discussion_r324852427</a> what idiom exactly are you referring to?</p>



<a name="175845843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175845843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175845843">(Sep 16 2019 at 19:48)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> </p>
<div class="codehilite"><pre><span></span><span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;**</span><span class="n">projection</span><span class="p">;</span><span class="w"></span>
<span class="w">                </span><span class="k">while</span><span class="w"> </span><span class="kd">let</span><span class="w"> </span><span class="p">[</span><span class="n">proj_base</span><span class="w"> </span><span class="o">@</span><span class="w"> </span><span class="p">..,</span><span class="w"> </span><span class="n">elem</span><span class="p">]</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">cursor</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="n">cursor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">proj_base</span><span class="p">;</span><span class="w"></span>
</pre></div>


<p>==&gt;</p>
<div class="codehilite"><pre><span></span><span class="n">projection</span><span class="p">.</span><span class="n">stuff</span><span class="p">(</span><span class="o">|</span><span class="n">cursor</span><span class="p">,</span><span class="w"> </span><span class="n">proj_base</span><span class="p">,</span><span class="w"> </span><span class="n">elem</span><span class="o">|</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="p">});</span><span class="w"></span>
</pre></div>


<p>or some such</p>



<a name="175846050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846050">(Sep 16 2019 at 19:51)</a>:</h4>
<p>or just <code>projection.stuff(|proj_base, elem| { ... })</code> since <code>cursor</code> isn't used in the loops</p>



<a name="175846084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846084">(Sep 16 2019 at 19:51)</a>:</h4>
<p>what we want is ...</p>



<a name="175846095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846095">(Sep 16 2019 at 19:51)</a>:</h4>
<p><code>for (proj_base, elem) in place.projection.iter()</code> :)</p>



<a name="175846171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846171">(Sep 16 2019 at 19:52)</a>:</h4>
<p>yea ok</p>



<a name="175846186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846186">(Sep 16 2019 at 19:52)</a>:</h4>
<p>the problem is that this is a slice</p>



<a name="175846244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846244">(Sep 16 2019 at 19:53)</a>:</h4>
<p>so we may need to go and do ...</p>



<a name="175846250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846250">(Sep 16 2019 at 19:54)</a>:</h4>
<p><code>for (proj_base, elem) in place.proj_iter()</code></p>



<a name="175846291"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846291" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846291">(Sep 16 2019 at 19:54)</a>:</h4>
<p>or something like that</p>



<a name="175846301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846301">(Sep 16 2019 at 19:54)</a>:</h4>
<p>to be honest unsure if worth all this</p>



<a name="175846302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846302">(Sep 16 2019 at 19:54)</a>:</h4>
<p>but happy to do what you guys like</p>



<a name="175846306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846306">(Sep 16 2019 at 19:54)</a>:</h4>
<p>/cc <span class="user-mention" data-user-id="124288">@oli</span></p>



<a name="175846307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846307">(Sep 16 2019 at 19:54)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> well the only difference there is that I've baked the for-loop into <code>.stuff</code></p>



<a name="175846353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846353">(Sep 16 2019 at 19:55)</a>:</h4>
<p>(cause I usually like to bake in imperative control flow and restrict it... /functional-programmer)</p>



<a name="175846381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846381">(Sep 16 2019 at 19:55)</a>:</h4>
<p>yeah, I've seen that already from your comments on PRs <span aria-label="smile" class="emoji emoji-263a" role="img" title="smile">:smile:</span></p>



<a name="175846388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846388">(Sep 16 2019 at 19:55)</a>:</h4>
<p>it's fine</p>



<a name="175846395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846395">(Sep 16 2019 at 19:55)</a>:</h4>
<p>but I kind of disagree :)</p>



<a name="175846453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846453">(Sep 16 2019 at 19:56)</a>:</h4>
<p>I guess is more correct to define an iterator that allows you to iterate over elem but carrying at the same time the previous elements</p>



<a name="175846511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846511">(Sep 16 2019 at 19:57)</a>:</h4>
<blockquote>
<p>but I kind of disagree :)</p>
</blockquote>
<p>I mean, on a given point more or less I don't care that much, but if you both want me to do that, happy to change the PR</p>



<a name="175846526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846526">(Sep 16 2019 at 19:57)</a>:</h4>
<p>I didn't want to have the previous things where we were carrying that index which is a bit error-prone</p>



<a name="175846628"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189540-t-compiler/wg-mir-opt/topic/Place%202.0/near/175846628" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/189540-t-compiler/wg-mir-opt/topic/Place.202.2E0.html#175846628">(Sep 16 2019 at 19:58)</a>:</h4>
<blockquote>
<p>I mean, on a given point more or less I don't care that much, but if you both want me to do that, happy to change the PR</p>
</blockquote>
<p>It's fine; I mostly wanted less duplication but it seems you'll be fixing that in another way later</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>